[nautilus] properties: fix crash when entering an unsupported URI



commit a1b42a6756d478492303a89273236b2a8c56f387
Author: Nelson Benítez León <nbenitezl+gnome gmail com>
Date:   Sun Nov 10 16:34:29 2013 +0100

    properties: fix crash when entering an unsupported URI
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711480

 src/nautilus-properties-window.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 4cf7244..df8d69f 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -5406,7 +5406,11 @@ custom_icon_file_chooser_response_cb (GtkDialog *dialog,
 
        case GTK_RESPONSE_OK:
                uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (dialog));
-               set_icon (uri, window);
+               if (uri != NULL) {
+                       set_icon (uri, window);
+               } else {
+                       reset_icon (window);
+               }
                g_free (uri);
                break;
 


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