X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-dimming-rule.c;h=778f06d6461a7578543aef65508f1fe0c6cc617b;hp=a481ce69a7a91dd13ef3da33dc7ed7367c01e165;hb=1ae76d480a98068ec23fb6fc6d231605302b809f;hpb=17e149470f77d037df836438e6f3fe00fc632b20 diff --git a/src/modest-dimming-rule.c b/src/modest-dimming-rule.c index a481ce6..778f06d 100644 --- a/src/modest-dimming-rule.c +++ b/src/modest-dimming-rule.c @@ -202,11 +202,14 @@ modest_dimming_rule_set_notification (ModestDimmingRule *rule, priv = MODEST_DIMMING_RULE_GET_PRIVATE(rule); /* Free previous notification */ - if (priv->notification != NULL) + if (priv->notification != NULL) { g_free(priv->notification); + priv->notification = NULL; + } /* Set new notification message */ - priv->notification = g_strdup(notification); + if (notification != NULL) + priv->notification = g_strdup(notification); } gchar *