From 5704ea9fa26da61ff3fd9e168ef57a05a98aa990 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 13 Jan 2009 11:24:20 +0100 Subject: [PATCH] check if mpd_Song pointer passed to Song::Song() is NULL --- src/song.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/song.cpp b/src/song.cpp index 5a819aed..0a44114b 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -26,7 +26,7 @@ #include "song.h" #include "settings.h" -Song::Song(mpd_Song *s, bool copy_ptr) : itsSong(s), +Song::Song(mpd_Song *s, bool copy_ptr) : itsSong(s ? s : mpd_newSong()), itsSlash(string::npos), itsHash(0), copyPtr(copy_ptr),