Fix a crash at the end of the last song on a playlist

This commit is contained in:
David Sansome 2010-04-12 00:21:41 +00:00
parent 1b0b8979df
commit aaee1ded22
1 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ bool GstEngine::Load(const QUrl& url) {
if (!pipeline)
return false;
if (crossfade)
if (crossfade && current_pipeline_)
StartFadeout();
current_pipeline_ = pipeline;
@ -344,7 +344,7 @@ bool GstEngine::Play( uint offset ) {
void GstEngine::Stop() {
url_ = QUrl(); // To ensure we return Empty from state()
if (fadeout_enabled_)
if (fadeout_enabled_ && current_pipeline_)
StartFadeout();
current_pipeline_.reset();