mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 05:15:10 +00:00
prevent from segf when no button on scene
This commit is contained in:
@@ -45,6 +45,8 @@ namespace BBM
|
||||
currentButton = nullptr;
|
||||
if (currentButton == nullptr && buttons.size())
|
||||
currentButton = &(**buttons.begin());
|
||||
if (!currentButton)
|
||||
return;
|
||||
this->updateCurrentButton();
|
||||
for (auto &[buttonEntity, clickComponent]: buttons) {
|
||||
if (buttonEntity == *currentButton) {
|
||||
|
||||
Reference in New Issue
Block a user