Fix crash with mismatched pushfont/popfont

This commit is contained in:
Henrik Rydgård committed 2024-11-28 09:50:29 +01:00
1 parent e7e12f4e2e
commit f665878b3c
2 files changed
+6 -6

No files matched your search

+5 -6
View File
@@ -315,6 +315,11 @@ void ImDisasmView::drawArguments(ImDrawList *drawList, Rect rc, const Disassembl
}
void ImDisasmView::Draw(ImDrawList *drawList) {
auto memLock = Memory::Lock();
if (!debugger->isAlive()) {
return;
}
// TODO: Don't need to do these every frame.
ImGui_PushFixedFont();
@@ -355,11 +360,6 @@ void ImDisasmView::Draw(ImDrawList *drawList) {
visibleRows_ = (int)((rect.bottom - rect.top + rowHeight_ - 1.f) / rowHeight_);
auto memLock = Memory::Lock();
if (!debugger->isAlive()) {
return;
}
unsigned int address = windowStart_;
std::map<u32, float> addressPositions;
@@ -494,7 +494,6 @@ void ImDisasmView::Draw(ImDrawList *drawList) {
PopupMenu();
drawList->PopClipRect();
}
void ImDisasmView::ScrollRelative(int amount) {