Skip to content

Commit 4026142

Browse files
committed
v2: Fix null deref in GameObjectsDisplay on RE9
worldPos2ScreenPos method not found on RE9 (different signature?). Add null check before calling. Pre-existing bug, not a regression.
1 parent c921268 commit 4026142

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mods/tools/GameObjectsDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void GameObjectsDisplay::on_frame() {
384384
m_d3d12.effect->Apply(data.command_list);
385385
m_d3d12.quad->Draw(data.command_list);
386386
});
387-
} else {
387+
} else if (world_to_screen != nullptr) {
388388
world_to_screen->call<void*>(&screen_pos, context, &pos, &view, &proj, &screen_size);
389389
draw_list->AddText(ImVec2(screen_pos.x, screen_pos.y), ImGui::GetColorU32(ImVec4(1.0f, 1.0f, 1.0f, 1.0f)), owner_name.c_str());
390390
}

0 commit comments

Comments
 (0)