From 8b1cbc33c025ebd5ae3969b1754cad634857e52f Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 24 Apr 2011 18:07:05 +0000 Subject: [PATCH] Fix a race condition on startup that would cause a crash if the album cover loader thread took too long to start (happened a lot on Windows) --- src/widgets/nowplayingwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widgets/nowplayingwidget.cpp b/src/widgets/nowplayingwidget.cpp index abf47a7c1..186f4707b 100644 --- a/src/widgets/nowplayingwidget.cpp +++ b/src/widgets/nowplayingwidget.cpp @@ -164,6 +164,10 @@ void NowPlayingWidget::CoverLoaderInitialised() { } void NowPlayingWidget::UpdateHeight(AlbumCoverLoader* loader) { + if (!loader) { + return; + } + switch (mode_) { case SmallSongDetails: cover_height_ = small_ideal_height_;