GtkAppChooserButton: Fix a possible crash

We were not correctly dealing with content_type being NULL
in one place.
This commit is contained in:
Matthias Clasen 2014-06-07 14:03:45 -04:00
parent 5727a86760
commit ed28a71bf2

View File

@ -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)
{