From 416c7fe4ba8749ba6705e5208664f220b1bc247f Mon Sep 17 00:00:00 2001 From: prefect Date: Sun, 30 Oct 2005 21:09:27 +0000 Subject: [PATCH] Get rid of errors (selection can have size 0). This was SVN commit r3061. --- .../data/mods/official/gui/test/functions_page_session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binaries/data/mods/official/gui/test/functions_page_session.js b/binaries/data/mods/official/gui/test/functions_page_session.js index 3ca9c2679d..5ce8005d09 100644 --- a/binaries/data/mods/official/gui/test/functions_page_session.js +++ b/binaries/data/mods/official/gui/test/functions_page_session.js @@ -211,7 +211,7 @@ function resetUpdateVars() propertyWatches[watchedObject].unwatchAll( selectionWatchHandler ); // Remove the handler propertyWatches = new Array(); - if( selection[0] ) + if( selection.length > 0 && selection[0] ) { // Watch the object itself selection[0].watchAll( selectionWatchHandler ); @@ -228,7 +228,7 @@ function resetUpdateVars() } } selectionChanged = false; - if( selection[0] ) + if( selection.length > 0 && selection[0] ) { selectionTemplate = selection[0].template; }