Browse Source

Fixed crash when trying to debug and compile at the same time

merge-requests/365/head
eidheim 10 years ago
parent
commit
7ab2211f45
  1. 1
      src/project.cc
  2. 8
      src/window.cc

1
src/project.cc

@ -286,7 +286,6 @@ void Project::Clang::debug_start() {
debug_update_stop(); debug_update_stop();
}); });
}); });
debug_start_mutex.unlock(); debug_start_mutex.unlock();
} }

8
src/window.cc

@ -531,7 +531,7 @@ void Window::set_menu_actions() {
entry_box.show(); entry_box.show();
}); });
menu.add_action("compile_and_run", [this]() { menu.add_action("compile_and_run", [this]() {
if(Project::compiling) if(Project::compiling || Project::debugging)
return; return;
if(Config::get().window.save_on_compile_or_run) if(Config::get().window.save_on_compile_or_run)
@ -541,7 +541,7 @@ void Window::set_menu_actions() {
project_language->compile_and_run(); project_language->compile_and_run();
}); });
menu.add_action("compile", [this]() { menu.add_action("compile", [this]() {
if(Project::compiling) if(Project::compiling || Project::debugging)
return; return;
if(Config::get().window.save_on_compile_or_run) if(Config::get().window.save_on_compile_or_run)
@ -612,7 +612,9 @@ void Window::set_menu_actions() {
entry_box.show(); entry_box.show();
}); });
menu.add_action("debug_start_continue", [this](){ menu.add_action("debug_start_continue", [this](){
if(Project::debugging) { if(Project::compiling)
return;
else if(Project::debugging) {
project_language->debug_continue(); project_language->debug_continue();
return; return;
} }

Loading…
Cancel
Save