Code review comment for lp:~macslow/notify-osd/fix-1257717

Revision history for this message
Lars Karlitski (larsu) wrote :

This will leak the timer source when the bubble gets dismissed before it times out. I don't know if that ever happens, but I recommend unsetting priv->timer_id in the callback, just in case:

=== modified file 'src/bubble.c'
--- src/bubble.c 2012-11-26 20:29:43 +0000
+++ src/bubble.c 2013-12-04 15:12:00 +0000
@@ -3038,6 +3038,11 @@
 {
        g_return_val_if_fail (IS_BUBBLE (self), FALSE);

+ /* This function always returns FALSE, which removes the timer
+ * source. Unset priv->timer_id so that we don't call
+ * g_source_remove() on it later. */
+ bubble_set_timer_id (self, 0);
+
        if (GET_PRIVATE (self)->composited)
        {
                bubble_fade_out (self, 300);

review: Disapprove

« Back to merge proposal