From 70e9ebe7a309229825d157a8dd567cd4b4774a45 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Mon, 30 Jan 2012 20:04:25 +0100 Subject: [PATCH] tag editor: fix segfault if LocateSong is used in tag editor --- src/tag_editor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index 8ac2f744..81d951bc 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -39,6 +39,7 @@ #include "song_info.h" #include "playlist.h" +using Global::myScreen; using Global::MainHeight; using Global::MainStartY; @@ -190,7 +191,6 @@ std::basic_string TagEditor::Title() void TagEditor::SwitchTo() { - using Global::myScreen; using Global::myLockedScreen; if (myScreen == this) @@ -871,6 +871,9 @@ bool TagEditor::PrevColumn() void TagEditor::LocateSong(const MPD::Song &s) { + if (myScreen == this) + return; + if (s.GetDirectory().empty()) return;