Skip to content

Commit

Permalink
[desktop] Fix crash in memory debugger when no rom is loaded. Fixes #37
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Dec 10, 2023
1 parent a9f4185 commit b062a26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/desktop-shared/gui_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static void debug_window_memory(void)
ImGui::EndTabItem();
}

if (ImGui::BeginTabItem("ROM"))
if (IsValidPointer(cart->GetROM()) && ImGui::BeginTabItem("ROM"))
{
ImGui::PushFont(gui_default_font);
mem_edit.DrawContents(cart->GetROM(), 0x8000, 0x8000);
Expand Down

0 comments on commit b062a26

Please sign in to comment.