aboutsummaryrefslogtreecommitdiff
path: root/src/libappindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-13 13:30:32 -0600
committerTed Gould <ted@gould.cx>2010-01-13 13:30:32 -0600
commit60236935d5da0be2de0833cded25ad9361305a43 (patch)
treeb0e636ef3b8b888034e91d7e2dc2a767cb3afa63 /src/libappindicator
parentb1b9134542bd3bcfa6b5492f0a7f1b83cf0ec32f (diff)
downloadlibayatana-appindicator-60236935d5da0be2de0833cded25ad9361305a43.tar.gz
libayatana-appindicator-60236935d5da0be2de0833cded25ad9361305a43.tar.bz2
libayatana-appindicator-60236935d5da0be2de0833cded25ad9361305a43.zip
Checking for the status of the variable getting passed in.
Diffstat (limited to 'src/libappindicator')
-rw-r--r--src/libappindicator/app-indicator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index a3ad1ee..baa2159 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -716,7 +716,9 @@ start_fallback_timer (AppIndicator * self, gboolean do_it_now)
static gboolean
fallback_timer_expire (gpointer data)
{
- AppIndicatorPrivate * priv = APP_INDICATOR_GET_PRIVATE(data);
+ g_return_val_if_fail(IS_APP_INDICATOR(data), FALSE);
+
+ AppIndicatorPrivate * priv = APP_INDICATOR(data)->priv;
AppIndicatorClass * class = APP_INDICATOR_GET_CLASS(data);
if (priv->status_icon == NULL) {
@@ -727,7 +729,9 @@ fallback_timer_expire (gpointer data)
if (class->unfallback != NULL) {
class->unfallback(APP_INDICATOR(data), priv->status_icon);
priv->status_icon = NULL;
- }
+ } else {
+ g_warning("Can't 'unfallback' and I have an allocated status_icon. Might be a memory leak!");
+ }
}
priv->fallback_timer = 0;