diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-15 19:27:53 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-15 19:27:53 +0100 |
commit | 785293f4bf1beec65d23be0612e545e4c26ec366 (patch) | |
tree | f250c34d82977116498b8049c8055fc3981478ab /editor/imgui.cpp | |
parent | a5acc700d6a3a9b050864cf78a0f9f2305babdff (diff) |
b
Diffstat (limited to 'editor/imgui.cpp')
-rw-r--r-- | editor/imgui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 3465f27a..02e3abc1 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -21,9 +21,9 @@ bool popup_target::operator==(const popup_target&) const = default; void app::init_imgui(Vector2i size) { - if (!_imgui) [[unlikely]] + if (!_imgui->context()) [[unlikely]] { - _imgui = Pointer<ImGuiIntegration::Context>{InPlaceInit, NoCreate}; + _imgui = safe_ptr<ImGuiIntegration::Context>{InPlaceInit, NoCreate}; *_imgui = ImGuiIntegration::Context{Vector2{size}, size, size}; fm_assert(_imgui->context()); } @@ -392,7 +392,7 @@ void app::do_popup_menu() void app::kill_popups(bool hard) { - const bool imgui = _imgui != nullptr; + const bool imgui = _imgui->context() != nullptr; if (imgui) fm_assert(_imgui->context()); @@ -403,13 +403,13 @@ void app::kill_popups(bool hard) if (hard) tested_light_chunk = {}; - if (_imgui) + if (_imgui->context()) ImGui::CloseCurrentPopup(); if (hard) kill_inspectors(); - if (_imgui) + if (_imgui->context()) ImGui::FocusWindow(nullptr); } |