diff --git a/src/notification.c b/src/notification.c index 7291758..6d609cc 100644 --- a/src/notification.c +++ b/src/notification.c @@ -204,7 +204,9 @@ void rawimage_free(RawImage *i) /* see notification.h */ void notification_free(notification *n) { - assert(n != NULL); + if (!n) + return; + g_free(n->appname); g_free(n->summary); g_free(n->body); diff --git a/src/notification.h b/src/notification.h index 47500f6..ab21e3c 100644 --- a/src/notification.h +++ b/src/notification.h @@ -119,7 +119,7 @@ void rawimage_free(RawImage *i); /** * Free the memory used by the given notification. * - * @param n: pointer to #notification + * @param n (nullable): pointer to #notification */ void notification_free(notification *n);