aboutsummaryrefslogtreecommitdiff
path: root/src/transport-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-12-22 16:43:17 +0000
committerConor Curran <conor.curran@canonical.com>2010-12-22 16:43:17 +0000
commit74028a3c0df6fba7ab407f3e6e69c199e7c7d240 (patch)
tree5cbfb68be98ef9a8ab1f9a59a9fb30b5d7923402 /src/transport-widget.c
parent1d49193cf8e565e55eb9d6b519e9d76438af9197 (diff)
downloadayatana-indicator-sound-74028a3c0df6fba7ab407f3e6e69c199e7c7d240.tar.gz
ayatana-indicator-sound-74028a3c0df6fba7ab407f3e6e69c199e7c7d240.tar.bz2
ayatana-indicator-sound-74028a3c0df6fba7ab407f3e6e69c199e7c7d240.zip
protect against a rogue null cairo contect in the draw method
Diffstat (limited to 'src/transport-widget.c')
-rw-r--r--src/transport-widget.c2
1 files changed, 2 insertions, 0 deletions
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 <conor.curran@canonical.com>
Mirco Müller <mirco.mueller@canonical.com>
+ Andrea Cimitan <andrea.cimitan@canonical.com>
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;