mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-26 02:14:15 +08:00
Fix game crash.
WHen overlay is shown, you have at least 1 friend connected and you resize the game window smaller to the friend list position, it crashes because ImGui::ListBoxHeader returns false when its clipped and ImGui::ListBoxFooter shouldn't be called.
This commit is contained in:
parent
ff6c3e994b
commit
76c9e7a9ee
@ -657,7 +657,8 @@ void Steam_Overlay::OverlayProc()
|
||||
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
|
||||
if (!friends.empty())
|
||||
{
|
||||
ImGui::ListBoxHeader("##label", friends.size());
|
||||
if (ImGui::ListBoxHeader("##label", friends.size()))
|
||||
{
|
||||
std::for_each(friends.begin(), friends.end(), [this](std::pair<Friend const, friend_window_state> &i)
|
||||
{
|
||||
ImGui::PushID(i.second.id-base_friend_window_id+base_friend_item_id);
|
||||
@ -675,6 +676,7 @@ void Steam_Overlay::OverlayProc()
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
ImGui::PopFont();
|
||||
|
Loading…
x
Reference in New Issue
Block a user