Skip to content

Commit

Permalink
Don't use error stack if empty
Browse files Browse the repository at this point in the history
Fallback to using location instead.

Fixes #212
  • Loading branch information
cyderize committed Feb 18, 2025
1 parent 8b31b48 commit 999fad7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MiniZincIDE/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2972,8 +2972,8 @@ void MainWindow::on_minizincError(const QJsonObject& error) {
: currentTheme.warningColor.get(darkMode);
QString messageType = isError ? "Errors" : "Warnings";

if (error["stack"].isArray()) {
auto stack = error["stack"].toArray();
auto stack = error["stack"].toArray();
if (!stack.empty()) {
QString lastFile = "";
int lastLine = -1;
for (auto it : stack) {
Expand Down

0 comments on commit 999fad7

Please sign in to comment.