Avoid potential crash.
authorSalvatore Iovene <salvatore@iovene.com>
Sun, 6 Dec 2009 14:53:37 +0000 (16:53 +0200)
committerSalvatore Iovene <salvatore@iovene.com>
Sun, 6 Dec 2009 14:53:37 +0000 (16:53 +0200)
maemo-tweaks.c

index 213c1a3..1fbff09 100644 (file)
@@ -73,9 +73,11 @@ osso_return_t execute (osso_context_t *osso, gpointer data,
 
     gtk_widget_destroy (GTK_WIDGET (dialog));
     g_object_unref (manager);
-    g_list_foreach (sections, (GFunc) g_object_unref, NULL);
     if (sections)
+    {
+        g_list_foreach (sections, (GFunc) g_object_unref, NULL);
         g_list_free (sections);
+    }
 
     return OSSO_OK;
 }