diff --git a/src/ui.ts b/src/ui.ts index 7849a43b..5571a0d6 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -248,7 +248,7 @@ function refreshWindowList() { // add other tools separate = true; - if (platform.disassemble) { + if (platform.disassemble && platform.saveState) { addWindowItem("#disasm", "Disassembly", () => { return new Views.DisassemblerView(); }); diff --git a/src/views.ts b/src/views.ts index 0421a10c..4ef1b332 100644 --- a/src/views.ts +++ b/src/views.ts @@ -500,8 +500,8 @@ export class ListingView extends DisassemblerView implements ProjectView { refresh(moveCursor: boolean) { this.refreshListing(); - if (!this.assemblyfile) return; // TODO? - var state = lastDebugState || platform.saveState(); // TODO? + if (!this.assemblyfile || !platform.saveState) return; + var state = lastDebugState || platform.saveState(); var pc = state.c ? (state.c.EPC || state.c.PC) : 0; var asmtext = this.assemblyfile.text; var disasmview = this.getDisasmView();