summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-25 16:08:50 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-25 16:08:50 +0100
commite158d762cc8f023b9584cd2599491b462cee07c9 (patch)
tree864ae54b3b56221e5f5b53de338e910a77e725fa /src
parent49f5a8f171fad33f7d003bdda0e50dab69e2c99b (diff)
Fix crash when trying to load non-existant analyses with the window hidden.
Diffstat (limited to 'src')
-rw-r--r--src/wx/audio_dialog.cc6
1 files changed, 5 insertions, 1 deletions
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<AudioContent> 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;
}