fix invalid free
Thanks To DaveDavenport
This commit is contained in:
parent
605eab0d4a
commit
39a0826fea
@ -385,11 +385,11 @@ int notification_init(notification * n, int id)
|
|||||||
n->start = 0;
|
n->start = 0;
|
||||||
|
|
||||||
if (n->icon == NULL) {
|
if (n->icon == NULL) {
|
||||||
n->icon = settings.icons[n->urgency];
|
n->icon = strdup(settings.icons[n->urgency]);
|
||||||
}
|
}
|
||||||
else if (strlen(n->icon) <= 0) {
|
else if (strlen(n->icon) <= 0) {
|
||||||
free(n->icon);
|
free(n->icon);
|
||||||
n->icon = settings.icons[n->urgency];
|
n->icon = strdup(settings.icons[n->urgency]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n->category == NULL) {
|
if (n->category == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user