[frogr] Properly handle errors loading pictures for details dialog



commit a776f48ba430090a9c436eea24e83e1937bfccb4
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Fri Jul 8 23:29:56 2011 +0200

    Properly handle errors loading pictures for details dialog

 src/frogr-details-dialog.c |    4 +++-
 src/frogr-util.c           |    1 -
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index 2c29d54..fbaf1db 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -666,7 +666,9 @@ _load_picture_from_disk_cb (GObject *object,
           _place_picture_in_dialog_and_show (self);
         }
     }
-  else
+
+  /* Show error to the user and finalize dialog if needed */
+  if (error)
     {
       GtkWindow *parent_window = NULL;
       gchar *error_msg = NULL;
diff --git a/src/frogr-util.c b/src/frogr-util.c
index d8dafa8..7e68ccf 100644
--- a/src/frogr-util.c
+++ b/src/frogr-util.c
@@ -267,7 +267,6 @@ frogr_util_get_corrected_pixbuf (GdkPixbuf *pixbuf, gint max_width, gint max_hei
   scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf,
                                            new_width, new_height,
                                            GDK_INTERP_TILES);
-
   /* Correct orientation if needed */
   orientation = gdk_pixbuf_get_option (pixbuf, "orientation");
 



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