GP-4257: Fix NPE in TraceDisassembleCommand.

This commit is contained in:
Dan 2024-01-23 16:55:16 -05:00
parent 25f07a2a05
commit c1c8cfb237

View file

@ -79,6 +79,9 @@ public class TraceDisassembleCommand extends TypedBackgroundCommand<TraceProgram
public boolean applyToTyped(TraceProgramView view, TaskMonitor monitor) {
Disassembler disassembler = getDisassembler(view, monitor);
MemBuffer buffer = getBuffer(view);
if (buffer == null) {
return true; // Memory space does not exist. Just go silently.
}
int limit = computeLimit();
// TODO: limit is actually instruction count, not byte count :'(
InstructionBlock block = disassembler.pseudoDisassembleBlock(buffer, initialContext, limit);