[nostalgia,studio] Fix crash that occurred when navigating to file that is not already open

This commit is contained in:
2025-02-20 23:57:02 -06:00
parent d0a32e247e
commit 25a7873ea2
4 changed files with 20 additions and 10 deletions
@@ -566,8 +566,10 @@ void TileSheetEditorImGui::drawPaletteMenu() noexcept {
m_view.setPalIdx(i);
}
if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(0)) {
auto const rqst = ox::sfmt<ox::BasicString<100>>("{};{}", i, m_model.palettePage());
oxLogError(studio::navigateTo(m_sctx, m_model.palPath(), rqst));
studio::navigateTo(
m_sctx,
m_model.palPath(),
ox::sfmt("{};{}", i, m_model.palettePage()));
}
// Column: color RGB
ImGui::TableNextColumn();