From 8add00aa44fa0b4d7e83b3d6074140e87c628479 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 1 Mar 2016 20:30:56 +0100 Subject: Check that {prolog,python,robot}Handler exists before destroying it --- js/codeq/robot.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'js/codeq/robot.js') diff --git a/js/codeq/robot.js b/js/codeq/robot.js index f64e4a0..70f7c5d 100644 --- a/js/codeq/robot.js +++ b/js/codeq/robot.js @@ -46,14 +46,13 @@ along with this program. If not, see . */ .fail(function (reason) { codeq.log.error('Failed to obtain the problem definition: ' + reason, reason); alert('Failed to obtain the problem definition: ' + reason); - - history.back();//TODO test + history.back(); }) .done(); }, 'exit': function () { jqScreen.css('display', 'none'); - robotHandler.destroy(); + if (robotHandler) robotHandler.destroy(); robotHandler = null; $('#navigation-problem-list').css('display', 'none'); -- cgit v1.2.1