mirror of
https://github.com/BreizhHardware/Poulpes-de-l-Espace-La-derniere-ligne-de-Defense.git
synced 2026-01-18 16:27:20 +01:00
Fix segFault
# To do: - Upgrade des tours - Dasagne - Easter egg - I'm a teapot
This commit is contained in:
@@ -118,6 +118,9 @@ void Game::keyPressEvent(QKeyEvent *event) {
|
||||
}
|
||||
|
||||
void Game::updateDisplay() const{
|
||||
if(this == nullptr || player == nullptr || healthDisplay == nullptr || goldDisplay == nullptr || waveDisplay == nullptr) {
|
||||
return;
|
||||
}
|
||||
healthDisplay->setPlainText("Health: " + QString::number(player->getHealth()));
|
||||
goldDisplay->setPlainText("Gold: " + QString::number(userGold));
|
||||
waveDisplay->setPlainText("Wave: " + QString::number(waveNumber));
|
||||
|
||||
Reference in New Issue
Block a user