浏览代码

Amend f6890ed mostly to please static analyzers.

ocornut 4 天之前
父节点
当前提交
62275e877a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -14139,7 +14139,7 @@ static ImVec2 ImGui::NavCalcPreferredRefPos()
         ImRect ref_rect;
         if (activated_shortcut)
             ref_rect = g.LastItemData.NavRect;
-        else
+        else if (window != NULL)
             ref_rect = WindowRectRelToAbs(window, window->NavRectRel[g.NavLayer]);
 
         // Take account of upcoming scrolling (maybe set mouse pos should be done in EndFrame?)