diff options
Diffstat (limited to 'src/plugins/webassembly/webassemblyrunconfiguration.cpp')
-rw-r--r-- | src/plugins/webassembly/webassemblyrunconfiguration.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.cpp b/src/plugins/webassembly/webassemblyrunconfiguration.cpp index 6bed76d2dd0..f4c56630fde 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.cpp +++ b/src/plugins/webassembly/webassemblyrunconfiguration.cpp @@ -42,17 +42,19 @@ namespace Internal { static CommandLine emrunCommand(Target *target, const QString &browser, const QString &port) { - BuildConfiguration *bc = target->activeBuildConfiguration(); - const QFileInfo emrunScript = bc->environment().searchInPath("emrun").toFileInfo(); - auto html = bc->buildDirectory().pathAppended(target->project()->displayName() + ".html"); - - return CommandLine(bc->environment().searchInPath("python"), { - emrunScript.absolutePath() + "/" + emrunScript.baseName() + ".py", - "--browser", browser, - "--port", port, - "--no_emrun_detect", - html.toString() - }); + if (BuildConfiguration *bc = target->activeBuildConfiguration()) { + const QFileInfo emrunScript = bc->environment().searchInPath("emrun").toFileInfo(); + auto html = bc->buildDirectory().pathAppended(target->project()->displayName() + ".html"); + + return CommandLine(bc->environment().searchInPath("python"), { + emrunScript.absolutePath() + "/" + emrunScript.baseName() + ".py", + "--browser", browser, + "--port", port, + "--no_emrun_detect", + html.toString() + }); + } + return {}; } // Runs a webassembly application via emscripten's "emrun" tool |