[gtk+] GtkAppChooserButton: Fix a possible crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkAppChooserButton: Fix a possible crash
- Date: Mon, 9 Jun 2014 17:39:59 +0000 (UTC)
commit ed28a71bf287165a3c48e331876a22876c5f59d9
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 7 14:03:45 2014 -0400
GtkAppChooserButton: Fix a possible crash
We were not correctly dealing with content_type being NULL
in one place.
gtk/gtkappchooserbutton.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c
index 9bdcf8b..af910c8 100644
--- a/gtk/gtkappchooserbutton.c
+++ b/gtk/gtkappchooserbutton.c
@@ -332,7 +332,8 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
if (self->priv->show_default_item)
{
- default_app = g_app_info_get_default_for_type (self->priv->content_type, FALSE);
+ if (self->priv->content_type)
+ default_app = g_app_info_get_default_for_type (self->priv->content_type, FALSE);
if (default_app != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]