[nautilus] Don't inspect a null default app
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Don't inspect a null default app
- Date: Wed, 22 Aug 2012 05:08:22 +0000 (UTC)
commit c24efca6e81ebbb11ab2cafe3a7232447022d2f5
Author: William Jon McCann <jmccann redhat com>
Date: Tue Aug 21 12:28:18 2012 -0400
Don't inspect a null default app
https://bugzilla.gnome.org/show_bug.cgi?id=682372
.../nautilus-mime-application-chooser.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libnautilus-private/nautilus-mime-application-chooser.c b/libnautilus-private/nautilus-mime-application-chooser.c
index f8a066f..adf2ed9 100644
--- a/libnautilus-private/nautilus-mime-application-chooser.c
+++ b/libnautilus-private/nautilus-mime-application-chooser.c
@@ -228,13 +228,13 @@ application_selected_cb (GtkAppChooserWidget *widget,
GAppInfo *default_app;
default_app = g_app_info_get_default_for_type (chooser->details->content_type, FALSE);
- gtk_widget_set_sensitive (chooser->details->set_as_default_button,
- !g_app_info_equal (info, default_app));
-
+ if (default_app != NULL) {
+ gtk_widget_set_sensitive (chooser->details->set_as_default_button,
+ !g_app_info_equal (info, default_app));
+ g_object_unref (default_app);
+ }
gtk_widget_set_sensitive (chooser->details->add_button,
app_info_can_add (info, chooser->details->content_type));
-
- g_object_unref (default_app);
}
static char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]