From 961889d37ddf79e7c3feb53b33e5584cbf0854d1 Mon Sep 17 00:00:00 2001 From: Roman Moravcik Date: Sat, 3 Apr 2010 08:49:35 +0200 Subject: [PATCH] Fixed crash of applet during the package update, if HAL wasn't previously initialized. --- src/flashlight_applet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flashlight_applet.c b/src/flashlight_applet.c index 641e8dd..cb9280a 100644 --- a/src/flashlight_applet.c +++ b/src/flashlight_applet.c @@ -297,6 +297,7 @@ flashlight_status_plugin_init (FlashlightPlugin *plugin) } libhal_ctx_set_user_data (priv->hal, NULL); libhal_ctx_free (priv->hal); + priv->hal = NULL; return; } @@ -327,6 +328,7 @@ flashlight_status_plugin_finalize (GObject *object) libhal_ctx_shutdown (priv->hal, NULL); libhal_ctx_free (priv->hal); } + priv->hal = NULL; /* cancel status timer */ if (priv->status_timer) { -- 1.7.9.5