2009-01-14 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Wed, 14 Jan 2009 15:29:35 +0000 (15:29 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Wed, 14 Jan 2009 15:29:35 +0000 (15:29 +0000)
* src/hildon-picker-dialog.c (_dialog_update_title): Fix memory
leak. Check for NULL before attempting to set the window title.

ChangeLog
src/hildon-picker-dialog.c

index 360857b..a2d7503 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-01-14  Alberto Garcia  <agarcia@igalia.com>
 
+       * src/hildon-picker-dialog.c (_dialog_update_title): Fix memory
+       leak. Check for NULL before attempting to set the window title.
+
+2009-01-14  Alberto Garcia  <agarcia@igalia.com>
+
        * src/hildon-picker-dialog.c (hildon_picker_dialog_show): Decide
        whether to show or not the 'Done' button each time the dialog is
        shown, as it depends on the HildonTouchSelector selection mode.
index c22183e..b80149e 100644 (file)
@@ -261,7 +261,9 @@ _dialog_update_title (HildonTouchSelector *selector,
 
   new_title = hildon_touch_selector_get_current_text (selector);
 
-  gtk_window_set_title (dialog, new_title);
+  gtk_window_set_title (dialog, new_title ? new_title : "");
+
+  g_free (new_title);
 }
 
 static void