[epiphany] ephy-profile-migrator: Check for errors correctly



commit fd1ce00c45ee40ff22e715f3f45ec49d317c71b1
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Mar 19 19:40:55 2013 +0100

    ephy-profile-migrator: Check for errors correctly
    
    This guards against error paths that might not return errors.
    It'll crash in the error path instead :)

 lib/ephy-profile-migrator.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index 934fc11..ac991af 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -840,8 +840,7 @@ store_form_auth_data_cb (GObject *object,
 {
   GError *error = NULL;
 
-  ephy_form_auth_data_store_finish (res, &error);
-  if (error) {
+  if (ephy_form_auth_data_store_finish (res, &error) == FALSE) {
     g_warning ("Couldn't store a form password: %s", error->message);
     g_error_free (error);
     goto out;


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