From 74028a3c0df6fba7ab407f3e6e69c199e7c7d240 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Wed, 22 Dec 2010 16:43:17 +0000 Subject: protect against a rogue null cairo contect in the draw method --- src/transport-widget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transport-widget.c b/src/transport-widget.c index d9c499d..d7f4b75 100644 --- a/src/transport-widget.c +++ b/src/transport-widget.c @@ -4,6 +4,7 @@ Copyright 2010 Canonical Ltd. Authors: Conor Curran Mirco Müller + Andrea Cimitan This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published @@ -1156,6 +1157,7 @@ static void draw (GtkWidget* button, cairo_t *cr) { g_return_if_fail(IS_TRANSPORT_WIDGET(button)); + g_return_if_fail( cr != NULL ); TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE(button); cairo_surface_t* surf = NULL; -- cgit v1.2.3