aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorp0wer <none@none>2010-03-02 17:44:59 -0600
committerp0wer <none@none>2010-03-02 17:44:59 -0600
commit0f4855d8f3b5fac8f9b01171e372df86df2e2ba0 (patch)
tree3754e37b02d266e960cce807fd196512df790201
parentfbe0f4ea2baa436102af5aa5c42f302690a84b23 (diff)
Fix possible crash in .gobject info.
--HG-- branch : trunk
-rw-r--r--src/game/Level2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index c7a9bcd89c6..8d37dc74cf8 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -2133,8 +2133,8 @@ bool ChatHandler::HandleGOInfoCommand(const char* args)
if(!*args)
{
- WorldObject * obj = getSelectedObject();
- entry = obj->GetEntry();
+ if(WorldObject * obj = getSelectedObject())
+ entry = obj->GetEntry();
}
else
entry = atoi((char*)args);