From: Roman Moravcik Date: Sat, 3 Apr 2010 06:49:35 +0000 (+0200) Subject: Fixed crash of applet during the package update, if HAL wasn't previously initialized. X-Git-Tag: v0.4-1~10 X-Git-Url: https://vcs.maemo.org/git/?p=flashlight-appl;a=commitdiff_plain;h=961889d37ddf79e7c3feb53b33e5584cbf0854d1 Fixed crash of applet during the package update, if HAL wasn't previously initialized. --- 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) {