mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Tabs: Fixed crash when using TabItem in a regular (non-docking) tab bar. (#2231)
This commit is contained in:
parent
f768727284
commit
3a5e758ee3
@ -6455,8 +6455,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
|||||||
// Drag and drop a single floating window node moves it
|
// Drag and drop a single floating window node moves it
|
||||||
// FIXME-DOCK: In theory we shouldn't test for the ConfigDockingNodifySingleWindows flag here.
|
// FIXME-DOCK: In theory we shouldn't test for the ConfigDockingNodifySingleWindows flag here.
|
||||||
// When our single window node and OnlyNodeWithWindows are working properly we may remove this check here.
|
// When our single window node and OnlyNodeWithWindows are working properly we may remove this check here.
|
||||||
ImGuiDockNode* node = docked_window->DockNode;
|
ImGuiDockNode* node = docked_window ? docked_window->DockNode : NULL;
|
||||||
const bool single_window_node = node->IsRootNode() && node->Windows.Size == 1 && g.IO.ConfigDockingTabBarOnSingleWindows;
|
const bool single_window_node = node && node->IsRootNode() && node->Windows.Size == 1 && g.IO.ConfigDockingTabBarOnSingleWindows;
|
||||||
if (held && single_window_node && IsMouseDragging(0, 0.0f))
|
if (held && single_window_node && IsMouseDragging(0, 0.0f))
|
||||||
{
|
{
|
||||||
// Move
|
// Move
|
||||||
|
Loading…
Reference in New Issue
Block a user