Skip to content

Commit

Permalink
Fix segmentation fault in the window interface when trying to get a m…
Browse files Browse the repository at this point in the history
…onitor from a windowed window
  • Loading branch information
Madman10K committed Aug 29, 2023
1 parent 9b99744 commit 9f44d9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Framework/Core/Interfaces/WindowInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ std::vector<UImGui::Monitor>& UImGui::Window::getMonitors() noexcept

UImGui::Monitor UImGui::Window::getWindowMonitor() noexcept
{
auto monitor = glfwGetWindowMonitor(Window::get().windowMain);
if (monitor == nullptr)
return {};
return Monitor(glfwGetWindowMonitor(Window::get().windowMain));
}

Expand Down

0 comments on commit 9f44d9e

Please sign in to comment.