Browse Source

Debug Tools: Metrics: Fixed a crash when browsing "InputText" section before using one. (#8071)

Caused by 21d03edcb
ocornut 9 months ago
parent
commit
db26fe7ca8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      imgui_widgets.cpp

+ 1 - 0
imgui_widgets.cpp

@@ -4129,6 +4129,7 @@ ImGuiInputTextState::ImGuiInputTextState()
 {
 {
     memset(this, 0, sizeof(*this));
     memset(this, 0, sizeof(*this));
     Stb = IM_NEW(ImStbTexteditState);
     Stb = IM_NEW(ImStbTexteditState);
+    memset(Stb, 0, sizeof(*Stb));
 }
 }
 
 
 ImGuiInputTextState::~ImGuiInputTextState()
 ImGuiInputTextState::~ImGuiInputTextState()