[vinagre] Correctly checks for an error when fails to open a file.



commit 32d441916e9da27d5ac34c886609576bf78fdf6a
Author: Jonh Wendell <jwendell gnome org>
Date:   Mon Aug 10 14:25:54 2009 -0300

    Correctly checks for an error when fails to open a file.

 vinagre/vinagre-connection.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vinagre/vinagre-connection.c b/vinagre/vinagre-connection.c
index 70c711a..14c8acb 100644
--- a/vinagre/vinagre-connection.c
+++ b/vinagre/vinagre-connection.c
@@ -616,7 +616,7 @@ vinagre_connection_new_from_file (const gchar *uri, gchar **error_msg, gboolean
 			     &data,
 			     NULL,
 			     NULL,
-			     &error));
+			     &error))
     {
       if (error)
 	{
@@ -647,7 +647,7 @@ the_end:
   g_free (data);
   g_object_unref (file_a);
 
-  if (!conn)
+  if (!conn && !*error_msg)
     *error_msg = g_strdup (_("The file was not recognized by any of the plugins."));
 
   return conn;



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