Skip to content

Commit 9f44d9e

Browse files
committed
Fix segmentation fault in the window interface when trying to get a monitor from a windowed window
1 parent 9b99744 commit 9f44d9e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Framework/Core/Interfaces/WindowInterface.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ std::vector<UImGui::Monitor>& UImGui::Window::getMonitors() noexcept
291291

292292
UImGui::Monitor UImGui::Window::getWindowMonitor() noexcept
293293
{
294+
auto monitor = glfwGetWindowMonitor(Window::get().windowMain);
295+
if (monitor == nullptr)
296+
return {};
294297
return Monitor(glfwGetWindowMonitor(Window::get().windowMain));
295298
}
296299

0 commit comments

Comments
 (0)