Merge lp:~cjcurran/indicator-sound/segfault-cairo-context-fix into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran
Status: Merged
Merged at revision: 103
Proposed branch: lp:~cjcurran/indicator-sound/segfault-cairo-context-fix
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 19 lines (+2/-0)
1 file modified
src/transport-widget.c (+2/-0)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/segfault-cairo-context-fix
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
Review via email: mp+44490@code.launchpad.net

Description of the change

Protects against attached null cairo pointer bug.

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) wrote :

seems correct to me, we need a not-NULL cairo context

Revision history for this message
Andrea Cimitan (cimi) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/transport-widget.c'
--- src/transport-widget.c 2010-12-07 14:18:28 +0000
+++ src/transport-widget.c 2010-12-22 17:00:41 +0000
@@ -4,6 +4,7 @@
4Authors:4Authors:
5 Conor Curran <conor.curran@canonical.com>5 Conor Curran <conor.curran@canonical.com>
6 Mirco Müller <mirco.mueller@canonical.com>6 Mirco Müller <mirco.mueller@canonical.com>
7 Andrea Cimitan <andrea.cimitan@canonical.com>
78
8This program is free software: you can redistribute it and/or modify it 9This program is free software: you can redistribute it and/or modify it
9under the terms of the GNU General Public License version 3, as published 10under the terms of the GNU General Public License version 3, as published
@@ -1156,6 +1157,7 @@
1156draw (GtkWidget* button, cairo_t *cr)1157draw (GtkWidget* button, cairo_t *cr)
1157{1158{
1158 g_return_if_fail(IS_TRANSPORT_WIDGET(button));1159 g_return_if_fail(IS_TRANSPORT_WIDGET(button));
1160 g_return_if_fail( cr != NULL );
1159 TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE(button); 1161 TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE(button);
11601162
1161 cairo_surface_t* surf = NULL;1163 cairo_surface_t* surf = NULL;

Subscribers

People subscribed via source and target branches