From a1b5bf42dbceffe387198de40db666ed7a65391f Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Thu, 26 May 2022 22:41:55 -0500 Subject: [PATCH] Fix occasional CoverView crash --- src/CoverView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CoverView.cpp b/src/CoverView.cpp index 73a11e1..2d8eb4e 100644 --- a/src/CoverView.cpp +++ b/src/CoverView.cpp @@ -75,11 +75,13 @@ CoverView::Pulse() if (fCurrentSong.InitCheck()) { fCurrentSong = song; delete fCover; + fCover = NULL; Invalidate(); } } else if (song != fCurrentSong) { fCurrentSong = song; - delete fCover; + if (fCover != NULL) + delete fCover; fCover = song.Cover(); Invalidate(); }