diff --git a/backends/imgui_impl_win32.cpp b/backends/imgui_impl_win32.cpp index 7cc57178847b..f8304d5c210c 100644 --- a/backends/imgui_impl_win32.cpp +++ b/backends/imgui_impl_win32.cpp @@ -513,6 +513,8 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARA ImGuiIO& io = ImGui::GetIO(); ImGui_ImplWin32_Data* bd = ImGui_ImplWin32_GetBackendData(); + if (bd == nullptr) + return 0; switch (msg) {