From 7ab2211f45a8444423861076884720998e13d144 Mon Sep 17 00:00:00 2001 From: eidheim Date: Sun, 14 Feb 2016 20:54:14 +0100 Subject: [PATCH] Fixed crash when trying to debug and compile at the same time --- src/project.cc | 1 - src/window.cc | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/project.cc b/src/project.cc index d718951..2bd9dcb 100644 --- a/src/project.cc +++ b/src/project.cc @@ -286,7 +286,6 @@ void Project::Clang::debug_start() { debug_update_stop(); }); - }); debug_start_mutex.unlock(); } diff --git a/src/window.cc b/src/window.cc index 78ac55b..eab641a 100644 --- a/src/window.cc +++ b/src/window.cc @@ -531,7 +531,7 @@ void Window::set_menu_actions() { entry_box.show(); }); menu.add_action("compile_and_run", [this]() { - if(Project::compiling) + if(Project::compiling || Project::debugging) return; if(Config::get().window.save_on_compile_or_run) @@ -541,7 +541,7 @@ void Window::set_menu_actions() { project_language->compile_and_run(); }); menu.add_action("compile", [this]() { - if(Project::compiling) + if(Project::compiling || Project::debugging) return; if(Config::get().window.save_on_compile_or_run) @@ -612,7 +612,9 @@ void Window::set_menu_actions() { entry_box.show(); }); menu.add_action("debug_start_continue", [this](){ - if(Project::debugging) { + if(Project::compiling) + return; + else if(Project::debugging) { project_language->debug_continue(); return; }