From 528ed2d15e9138b568853ff1bb15cd817fdf25a2 Mon Sep 17 00:00:00 2001 From: mimo Date: Mon, 12 Jan 2015 22:03:03 +0000 Subject: [PATCH] prevent error when switching perspective to gaia This was SVN commit r16145. --- .../data/mods/public/simulation/components/GuiInterface.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/binaries/data/mods/public/simulation/components/GuiInterface.js b/binaries/data/mods/public/simulation/components/GuiInterface.js index 1fd9272746..0a873ff272 100644 --- a/binaries/data/mods/public/simulation/components/GuiInterface.js +++ b/binaries/data/mods/public/simulation/components/GuiInterface.js @@ -648,7 +648,10 @@ GuiInterface.prototype.GetStartedResearch = function(player) GuiInterface.prototype.GetBattleState = function(player) { var cmpBattleDetection = QueryPlayerIDInterface(player, IID_BattleDetection); - return cmpBattleDetection.GetState(); + if (cmpBattleDetection) + return cmpBattleDetection.GetState(); + else + return false; }; // Returns a list of ongoing attacks against the player.