[vinagre] Check for value before unref a widget



commit 8a0ecae717f6507a020a6b7aa372ff12417f572b
Author: Jonh Wendell <jwendell gnome org>
Date:   Thu Jul 30 16:37:58 2009 -0300

    Check for value before unref a widget

 vinagre/vinagre-connect.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/vinagre/vinagre-connect.c b/vinagre/vinagre-connect.c
index e2a2483..20737d1 100644
--- a/vinagre/vinagre-connect.c
+++ b/vinagre/vinagre-connect.c
@@ -431,7 +431,8 @@ VinagreConnection *vinagre_connect (VinagreWindow *window)
 			"fullscreen", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog.fullscreen_check)),
 			NULL);
 
-	  vinagre_connection_parse_options_widget (conn, options);
+	  if (options)
+	    vinagre_connection_parse_options_widget (conn, options);
 
 	  g_free (protocol);
 	  g_free (actual_host);
@@ -443,7 +444,8 @@ VinagreConnection *vinagre_connect (VinagreWindow *window)
 	}
 
       g_object_unref (plugin);
-      g_object_unref (options);
+      if (options)
+	g_object_unref (options);
 
 fail:
       g_free (host);



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