diff options
author | Robert Tari <robert@tari.in> | 2020-08-13 11:08:52 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2020-08-13 11:08:52 +0200 |
commit | f0ee1dfa0c369466c1d2e109252bcda0f5464009 (patch) | |
tree | 84084a0d86d0fc90394443261fbf3e40db1b91b0 | |
parent | 27f00a52a6d0b1c51c874009616b0488e322c7da (diff) | |
download | libayatana-indicator-f0ee1dfa0c369466c1d2e109252bcda0f5464009.tar.gz libayatana-indicator-f0ee1dfa0c369466c1d2e109252bcda0f5464009.tar.bz2 libayatana-indicator-f0ee1dfa0c369466c1d2e109252bcda0f5464009.zip |
Try to prevent cascading failure if IDO creation fails
-rw-r--r-- | libayatana-indicator/indicator-ng.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libayatana-indicator/indicator-ng.c b/libayatana-indicator/indicator-ng.c index 8ede1a6..c0e85e5 100644 --- a/libayatana-indicator/indicator-ng.c +++ b/libayatana-indicator/indicator-ng.c @@ -265,6 +265,11 @@ static gboolean indicator_ng_menu_insert_idos(IndicatorNg *self, GMenuModel *pSe bChanged = TRUE; } + if (pMenuItemNew == NULL) + { + pMenuItemNew = GTK_MENU_ITEM(gtk_menu_item_new_with_label("Failed to create IDO object")); + } + gtk_widget_set_name(GTK_WIDGET(pMenuItemNew), sType); gtk_widget_show(GTK_WIDGET(pMenuItemNew)); gtk_container_remove(GTK_CONTAINER(self->entry.menu), pMenuItemOld); |