Skip to content

Commit 8527ce6

Browse files
committed
Merge remote-tracking branch 'origin/GP-0_ghidraffe_GhidraGoTestFix'
2 parents c4fefb5 + 3f61c47 commit 8527ce6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Ghidra/Features/GhidraGo/src/main/java/ghidra/GhidraGo.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public class GhidraGo implements GhidraLaunchable {
4949
*/
5050
@Override
5151
public void launch(GhidraApplicationLayout layout, String[] args) throws Exception {
52+
ApplicationConfiguration configuration = null;
5253
try {
53-
ApplicationConfiguration configuration = null;
5454
if (!Application.isInitialized()) {
5555
System.setProperty(ApplicationProperties.APPLICATION_NAME_PROPERTY, "GhidraGo");
5656
configuration = new DockingApplicationConfiguration();
@@ -92,7 +92,12 @@ public void launch(GhidraApplicationLayout layout, String[] args) throws Excepti
9292
catch (Exception e) {
9393
logOrShowError("GhidraGo Exception", "An unexpected exception occurred in GhidraGo", e);
9494
}
95-
System.exit(-1);
95+
// if configuration is null, probably running inside a test
96+
if (configuration != null) {
97+
// calling System.exit explicitly is necessary, otherwise the Loading... screen
98+
// persists instead of closing when complete.
99+
System.exit(-1);
100+
}
96101
}
97102

98103
private void logOrShowError(String errorTitle, String errorMessage, Exception e) {

0 commit comments

Comments
 (0)