Skip to content

Commit

Permalink
ProjectManagerPlugin: prevent a crash
Browse files Browse the repository at this point in the history
Probably also helps with #28
  • Loading branch information
diegoiast committed Dec 7, 2024
1 parent 24a8028 commit 675848c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/ProjectManager/ProjectManagerPlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ void ProjectManagerPlugin::runButton_clicked() {

void ProjectManagerPlugin::runTask_clicked() {
auto buildConfig = getCurrentConfig();
if (selectedTaskIndex < 0) {
selectedTaskIndex = 0;
}
if (!buildConfig || selectedTaskIndex >= buildConfig->tasksInfo.size()) {
return;
}
auto selectedTask = buildConfig->tasksInfo[selectedTaskIndex];
do_runTask(&selectedTask);
}
Expand Down

0 comments on commit 675848c

Please sign in to comment.