aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-07-11 16:00:12 -0500
committerTed Gould <ted@gould.cx>2011-07-11 16:00:12 -0500
commitee271867c1390ff9438158a3b88387432cd24f37 (patch)
treec38579cb73897386d3be59430b749bc0c00a9f94 /tools
parentca29a765c5d359b7209827275c71e8fb250fc1bc (diff)
downloadlibayatana-indicator-ee271867c1390ff9438158a3b88387432cd24f37.tar.gz
libayatana-indicator-ee271867c1390ff9438158a3b88387432cd24f37.tar.bz2
libayatana-indicator-ee271867c1390ff9438158a3b88387432cd24f37.zip
Handle NULL entries without crashing
Diffstat (limited to 'tools')
-rw-r--r--tools/indicator-loader.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c
index 027d364..06dd4b4 100644
--- a/tools/indicator-loader.c
+++ b/tools/indicator-loader.c
@@ -32,7 +32,9 @@ activate_entry (GtkWidget * widget, gpointer user_data)
{
g_return_if_fail(INDICATOR_IS_OBJECT(user_data));
gpointer entry = g_object_get_data(G_OBJECT(widget), ENTRY_DATA_NAME);
- g_return_if_fail(entry == NULL);
+ if (entry == NULL) {
+ g_debug("Activation on: (null)");
+ }
indicator_object_entry_activate(INDICATOR_OBJECT(user_data), (IndicatorObjectEntry *)entry, gtk_get_current_event_time());
return;
@@ -99,7 +101,11 @@ entry_removed (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user
static void
menu_show (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data)
{
- g_debug("Show Menu: %s", entry->label != NULL ? gtk_label_get_text(entry->label) : "No Label");
+ if (entry != NULL) {
+ g_debug("Show Menu: %s", entry->label != NULL ? gtk_label_get_text(entry->label) : "No Label");
+ } else {
+ g_debug("Show Menu: (null)");
+ }
return;
}