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
1=== modified file 'src/transport-widget.c'
2--- src/transport-widget.c 2010-12-07 14:18:28 +0000
3+++ src/transport-widget.c 2010-12-22 17:00:41 +0000
4@@ -4,6 +4,7 @@
5 Authors:
6 Conor Curran <conor.curran@canonical.com>
7 Mirco Müller <mirco.mueller@canonical.com>
8+ Andrea Cimitan <andrea.cimitan@canonical.com>
9
10 This program is free software: you can redistribute it and/or modify it
11 under the terms of the GNU General Public License version 3, as published
12@@ -1156,6 +1157,7 @@
13 draw (GtkWidget* button, cairo_t *cr)
14 {
15 g_return_if_fail(IS_TRANSPORT_WIDGET(button));
16+ g_return_if_fail( cr != NULL );
17 TransportWidgetPrivate* priv = TRANSPORT_WIDGET_GET_PRIVATE(button);
18
19 cairo_surface_t* surf = NULL;

Subscribers

People subscribed via source and target branches