Make NULL a valid input for notification_free
This commit is contained in:
parent
54ce81ccca
commit
646d037b15
@ -204,7 +204,9 @@ void rawimage_free(RawImage *i)
|
|||||||
/* see notification.h */
|
/* see notification.h */
|
||||||
void notification_free(notification *n)
|
void notification_free(notification *n)
|
||||||
{
|
{
|
||||||
assert(n != NULL);
|
if (!n)
|
||||||
|
return;
|
||||||
|
|
||||||
g_free(n->appname);
|
g_free(n->appname);
|
||||||
g_free(n->summary);
|
g_free(n->summary);
|
||||||
g_free(n->body);
|
g_free(n->body);
|
||||||
|
@ -119,7 +119,7 @@ void rawimage_free(RawImage *i);
|
|||||||
/**
|
/**
|
||||||
* Free the memory used by the given notification.
|
* Free the memory used by the given notification.
|
||||||
*
|
*
|
||||||
* @param n: pointer to #notification
|
* @param n (nullable): pointer to #notification
|
||||||
*/
|
*/
|
||||||
void notification_free(notification *n);
|
void notification_free(notification *n);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user