SaveTool: add safety measures in drawMassViewer().
This commit is contained in:
parent
7fcf8b518e
commit
f3318e0ed1
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,12 @@
|
|||
#include "SaveTool.h"
|
||||
|
||||
void SaveTool::drawMassViewer() {
|
||||
if(!_currentMass || _currentMass->state() != Mass::State::Valid) {
|
||||
_currentMass = nullptr;
|
||||
_uiState = UiState::MainManager;
|
||||
return;
|
||||
}
|
||||
|
||||
ImGui::SetNextWindowPos({0.0f, ImGui::GetItemRectSize().y}, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize({Float(windowSize().x()), Float(windowSize().y()) - ImGui::GetItemRectSize().y},
|
||||
ImGuiCond_Always);
|
||||
|
|
Loading…
Reference in a new issue