Skip to content

Commit

Permalink
Fixing an issue where the tests blow up due to ImGui-related crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
katemonster33 committed Apr 10, 2024
1 parent 629792e commit c2e2884
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,13 @@ cataimgui::window::window( const std::string &id_, int window_flags ) : window(

cataimgui::window::~window()
{
ImGui::ClearWindowSettings( id.c_str() );
p_impl.reset();
if( !ui_adaptor::has_imgui() ) {
ImGui::GetIO().ClearInputKeys();
GImGui->InputEventsQueue.resize( 0 );
if( GImGui ) {
ImGui::ClearWindowSettings( id.c_str() );
if( !ui_adaptor::has_imgui() ) {
ImGui::GetIO().ClearInputKeys();
GImGui->InputEventsQueue.resize( 0 );
}
}
}

Expand Down

0 comments on commit c2e2884

Please sign in to comment.