From e158d762cc8f023b9584cd2599491b462cee07c9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 25 Oct 2013 16:08:50 +0100 Subject: Fix crash when trying to load non-existant analyses with the window hidden. --- src/wx/audio_dialog.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc index c7a0815f8..b7c244c9c 100644 --- a/src/wx/audio_dialog.cc +++ b/src/wx/audio_dialog.cc @@ -101,7 +101,11 @@ AudioDialog::set_content (shared_ptr c) void AudioDialog::try_to_load_analysis () { - if (!boost::filesystem::exists (_content->audio_analysis_path()) && IsShown ()) { + if (!IsShown ()) { + return; + } + + if (!boost::filesystem::exists (_content->audio_analysis_path())) { _content->analyse_audio (bind (&AudioDialog::analysis_finished, this)); return; } -- cgit v1.2.3