[gnome-control-center] info: Fix crash when application supports no mime-type
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] info: Fix crash when application supports no mime-type
- Date: Thu, 19 Feb 2015 14:24:27 +0000 (UTC)
commit d9f08df39cafbd1f15c510da444f8ac913cdc493
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 18 10:10:08 2015 +0100
info: Fix crash when application supports no mime-type
It seems to be possible for Firefox Nightly to set itself up as the
default x-scheme-handler/http without actually handling any mime-types.
See https://bugzilla.redhat.com/show_bug.cgi?id=1193680
https://bugzilla.gnome.org/show_bug.cgi?id=744695
panels/info/cc-info-panel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 86513a4..ad89d54 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -854,7 +854,7 @@ default_app_changed (GtkAppChooserButton *button,
pattern = g_pattern_spec_new (app_data->extra_type_filter);
mime_types = g_app_info_get_supported_types (info);
- for (i = 0; mime_types[i]; i++)
+ for (i = 0; mime_types && mime_types[i]; i++)
{
if (!g_pattern_match_string (pattern, mime_types[i]))
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]