Only destroy ImGui context of != null

Fixes #911
This commit is contained in:
Sascha Willems 2021-12-15 19:32:47 +01:00
parent 48de215d0b
commit 91958acad2

View file

@ -51,7 +51,9 @@ namespace vks
}
UIOverlay::~UIOverlay() {
ImGui::DestroyContext();
if (ImGui::GetCurrentContext()) {
ImGui::DestroyContext();
}
}
/** Prepare all vulkan resources required to render the UI overlay */