[gnome-commander/gcmd-1-2-8] Assert for plugin!=NULL BEFORE using it



commit a2b23c2c156b476d5d5436264a18a384e0f6e594
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Fri Jan 7 23:38:49 2011 +0100

    Assert for plugin!=NULL BEFORE using it

 src/plugin_manager.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugin_manager.cc b/src/plugin_manager.cc
index e3a731e..6e34990 100644
--- a/src/plugin_manager.cc
+++ b/src/plugin_manager.cc
@@ -381,10 +381,11 @@ static void on_about (GtkButton *button, GtkWidget *dialog)
 {
     GtkCList *list = GTK_CLIST (lookup_widget (dialog, "avail_list"));
     PluginData *data = get_selected_plugin (list);
-    GtkWidget *about = gnome_cmd_about_plugin_new (data->info);
 
     g_return_if_fail (data != NULL);
 
+    GtkWidget *about = gnome_cmd_about_plugin_new (data->info);
+
     gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (main_win));
     gtk_widget_ref (about);
     gtk_widget_show (about);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]