app-chooser-button: make sure to always get a valid iter

Even in case there are no installed applications for our content type.
This commit is contained in:
Cosimo Cecchi
2010-12-01 16:29:57 +01:00
parent 959fc60c47
commit 9ffd1f7adb

View File

@@ -262,6 +262,8 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
recommended_apps = g_app_info_get_recommended_for_type (self->priv->content_type);
first = TRUE;
get_first_iter (self->priv->store, &iter);
for (l = recommended_apps; l != NULL; l = l->next)
{
app = l->data;
@@ -275,7 +277,6 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
if (first)
{
get_first_iter (self->priv->store, &iter);
first = FALSE;
}
else