summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-02-24 16:50:20 (GMT)
committer jacob1 <jfu614@gmail.com>2013-02-24 16:50:20 (GMT)
commit7379a6b5ba65ff106ec5656bdeb3a9707e9fac62 (patch)
tree9dc702b7d3ec3bbe2b57ddb5d290cf19ae424b38 /src/game/GameController.cpp
parent6b1e99a73169550e8bcb4c29ff105dde83924cea (diff)
downloadpowder-7379a6b5ba65ff106ec5656bdeb3a9707e9fac62.zip
powder-7379a6b5ba65ff106ec5656bdeb3a9707e9fac62.tar.gz
fix crash when hovering the mouse over invalid wall types
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 9e7978b..c866805 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -1298,7 +1298,7 @@ std::string GameController::ElementResolve(int type)
std::string GameController::WallName(int type)
{
- if(gameModel && gameModel->GetSimulation() && gameModel->GetSimulation()->wtypes && type >= 0)
+ if(gameModel && gameModel->GetSimulation() && gameModel->GetSimulation()->wtypes && type >= 0 && type < UI_WALLCOUNT)
return std::string(gameModel->GetSimulation()->wtypes[type].name);
else
return "";