IM_ASSERT(GImGui!=NULL&&"No current context. Did you call ImGui::CreateContext() and ImGui::SetCurrentContext() ?");
ImGuiContext&g=*GImGui;
ImGuiContext&g=*GImGui;
#ifdef IMGUI_ENABLE_TEST_ENGINE
ImGuiTestEngineHook_PreNewFrame(&g);
#endif
// Check user data
// Check user data
// (We pass an error message in the assert expression to make it visible to programmers who are not using a debugger, as most assert handlers display their argument)
// (We pass an error message in the assert expression to make it visible to programmers who are not using a debugger, as most assert handlers display their argument)
IM_ASSERT(g.Initialized);
IM_ASSERT(g.Initialized);
@ -3605,7 +3601,6 @@ void ImGui::NewFrame()
IM_ASSERT(g.Style.Alpha>=0.0f&&g.Style.Alpha<=1.0f&&"Invalid style setting. Alpha cannot be negative (allows us to avoid a few clamps in color computations)!");
IM_ASSERT(g.Style.Alpha>=0.0f&&g.Style.Alpha<=1.0f&&"Invalid style setting. Alpha cannot be negative (allows us to avoid a few clamps in color computations)!");
IM_ASSERT(g.IO.KeyMap[n]>=-1&&g.IO.KeyMap[n]<IM_ARRAYSIZE(g.IO.KeysDown)&&"io.KeyMap[] contains an out of bound value (need to be 0..512, or -1 for unmapped key)");
IM_ASSERT(g.IO.KeyMap[n]>=-1&&g.IO.KeyMap[n]<IM_ARRAYSIZE(g.IO.KeysDown)&&"io.KeyMap[] contains an out of bound value (need to be 0..512, or -1 for unmapped key)");
@ -3616,6 +3611,19 @@ void ImGui::NewFrame()
// Perform simple check: the beta io.ConfigWindowsResizeFromEdges option requires back-end to honor mouse cursor changes and set the ImGuiBackendFlags_HasMouseCursors flag accordingly.
// Perform simple check: the beta io.ConfigWindowsResizeFromEdges option requires back-end to honor mouse cursor changes and set the ImGuiBackendFlags_HasMouseCursors flag accordingly.