aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-ng.c
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-11-05 10:26:24 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-10 13:32:32 +0100
commit40e310ba6872a0ddc29f5ff3ba9cc805c60ed4a9 (patch)
tree8e9f8846966d3378dc8b3fcdf42f13c7f0c367b4 /src/indicator-ng.c
parent71b39fb0df9b444da73ac420146a71fecfbc6efd (diff)
downloadlibayatana-indicator-40e310ba6872a0ddc29f5ff3ba9cc805c60ed4a9.tar.gz
libayatana-indicator-40e310ba6872a0ddc29f5ff3ba9cc805c60ed4a9.tar.bz2
libayatana-indicator-40e310ba6872a0ddc29f5ff3ba9cc805c60ed4a9.zip
src/indicator-ng.c: Make sure old menu item name is not NULL before comparison
Fixes https://github.com/AyatanaIndicators/libayatana-indicator/issues/60
Diffstat (limited to 'src/indicator-ng.c')
-rw-r--r--src/indicator-ng.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/indicator-ng.c b/src/indicator-ng.c
index f057600..6739584 100644
--- a/src/indicator-ng.c
+++ b/src/indicator-ng.c
@@ -1,5 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
+ * Copyright 2021 Robert tari
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -15,6 +16,7 @@
*
* Authors:
* Lars Uebernickel <lars.uebernickel@canonical.com>
+ * Robert Tari <robert@tari.in>
*/
#include "indicator-ng.h"
@@ -244,7 +246,7 @@ static gboolean indicator_ng_menu_insert_idos(IndicatorNg *self, GMenuModel *pSe
GtkWidget *pMenuItemOld = GTK_WIDGET(g_list_nth_data(lMenuItems, nMenuItem));
const gchar *sName = gtk_widget_get_name(pMenuItemOld);
- if (!g_str_equal(sName, sType))
+ if (sName != NULL && !g_str_equal(sName, sType))
{
GActionGroup *pActionGroup = (GActionGroup*)g_object_get_qdata(G_OBJECT(self->entry.menu), m_pActionMuxer);
GMenuItem *pMenuModelItem = g_menu_item_new_from_model(pSection, nModelItem);