summaryrefslogtreecommitdiffstats
path: root/examples/statemachine/tankgame/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/statemachine/tankgame/mainwindow.cpp')
-rw-r--r--examples/statemachine/tankgame/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/statemachine/tankgame/mainwindow.cpp b/examples/statemachine/tankgame/mainwindow.cpp
index fcc0325..3437140 100644
--- a/examples/statemachine/tankgame/mainwindow.cpp
+++ b/examples/statemachine/tankgame/mainwindow.cpp
@@ -201,7 +201,7 @@ void MainWindow::gameOver()
TankItem *lastTankStanding = 0;
foreach (QGraphicsItem *item, items) {
if (GameItem *gameItem = qgraphicsitem_cast<GameItem *>(item)) {
- if (lastTankStanding = qobject_cast<TankItem *>(gameItem))
+ if ((lastTankStanding = qobject_cast<TankItem *>(gameItem)) != 0)
break;
}
}