mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-22 12:25:38 +02:00
module/mpd: don't try to strdup() NULL strings
This commit is contained in:
parent
9b5dca52e2
commit
1534e00236
1 changed files with 3 additions and 3 deletions
|
@ -353,9 +353,9 @@ update_status(struct module *mod)
|
||||||
free(m->artist);
|
free(m->artist);
|
||||||
free(m->title);
|
free(m->title);
|
||||||
|
|
||||||
m->album = strdup(album);
|
m->album = album != NULL ? strdup(album) : NULL;
|
||||||
m->artist = strdup(artist);
|
m->artist = artist != NULL ? strdup(artist) : NULL;
|
||||||
m->title = strdup(title);
|
m->title = title != NULL ? strdup(title) : NULL;
|
||||||
mtx_unlock(&mod->lock);
|
mtx_unlock(&mod->lock);
|
||||||
|
|
||||||
mpd_song_free(song);
|
mpd_song_free(song);
|
||||||
|
|
Loading…
Add table
Reference in a new issue