Merge branch 'GP-0_ghidra1_testFix'

This commit is contained in:
ghidra1 2021-04-08 10:43:33 -04:00
commit 3a2922e175
2 changed files with 8 additions and 3 deletions

View File

@ -29,6 +29,7 @@ import ghidra.program.model.address.AddressSet;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation;
import ghidra.program.util.ProgramSelection;
import ghidra.util.Swing;
import ghidra.util.SystemUtilities;
/**
@ -64,7 +65,9 @@ public class GhidraState {
this.currentHighlight = highlight;
this.isGlobalState = true;
if (!SystemUtilities.isInHeadlessMode()) {
gatherParamPanel = new GatherParamPanel(this);
Swing.runNow(() -> {
gatherParamPanel = new GatherParamPanel(this);
});
}
}

View File

@ -84,8 +84,10 @@ public class GhidraScriptAskMethodsTest extends AbstractGhidraHeadedIntegrationT
}
private void clearScriptCachedValues() {
Map<?, ?> map = (Map<?, ?>) TestUtils.getInstanceField("askMap", script);
map.clear();
if (script != null) {
Map<?, ?> map = (Map<?, ?>) TestUtils.getInstanceField("askMap", script);
map.clear();
}
}
@Test