Fixed mistake with vector empty check

This commit is contained in:
Yousef Khadadeh 2026-03-11 15:48:56 +03:00
parent 0406ec3caf
commit 15e98c6e1f

View file

@ -856,7 +856,7 @@ void InputManager::backend_key_down_update(const SDL_KeyboardEvent& e) {
std::shared_ptr<RichText::TextBox> textBox = text.textBoxes.empty() ? nullptr : text.textBoxes.front().textBox;
std::shared_ptr<RichText::TextBox::Cursor> cursor = text.textBoxes.empty() ? nullptr : text.textBoxes.front().cursor;
std::optional<RichText::TextStyleModifier::ModifierMap> modMap = text.textBoxes.empty() ? shared_ptr_to_opt(text.textBoxes.front().modMap) : std::nullopt;
std::optional<RichText::TextStyleModifier::ModifierMap> modMap = text.textBoxes.empty() ? std::nullopt : shared_ptr_to_opt(text.textBoxes.front().modMap);
switch(kPress) {
case SDLK_UP: