[libdazzle] menu-button: check for valid pointer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] menu-button: check for valid pointer
- Date: Mon, 10 Jul 2017 23:10:04 +0000 (UTC)
commit f90e1a42721a58ee48ed1ef5f867aedad744b5a6
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 10 16:03:33 2017 -0700
menu-button: check for valid pointer
This can be NULL, so check it first.
src/menus/dzl-menu-button-item.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/menus/dzl-menu-button-item.c b/src/menus/dzl-menu-button-item.c
index da8e593..420ae67 100644
--- a/src/menus/dzl-menu-button-item.c
+++ b/src/menus/dzl-menu-button-item.c
@@ -116,7 +116,7 @@ dzl_menu_button_item_notify_action_name (DzlMenuButtonItem *self,
if (action_name)
parts = g_strsplit (action_name, ".", 2);
- if (parts[0] && parts[1])
+ if (parts && parts[0] && parts[1])
draw = action_is_stateful (GTK_WIDGET (self), parts[0], parts[1]);
g_object_set (self, "draw-indicator", draw, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]