From 47f3b8ab8e0dec411d08c3a9fc03e5ebff76bd0f Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 2 Jun 2010 21:34:55 +0000 Subject: [PATCH] some defensive programming git-svn-id: svn://svn.open-ils.org/ILS/trunk@16564 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/main/ws_info.xul | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/main/ws_info.xul b/Open-ILS/xul/staff_client/server/main/ws_info.xul index 0e27a6652..8d634b688 100644 --- a/Open-ILS/xul/staff_client/server/main/ws_info.xul +++ b/Open-ILS/xul/staff_client/server/main/ws_info.xul @@ -118,12 +118,17 @@ util.widgets.remove_children( x ); var default_lib = g.my_lib; - if (typeof g.my_libs_ou_hash[ default_lib ] == 'undefined') { - default_lib = null; - } else { - if ( !get_bool( g.aout_hash[ g.my_libs_ou_hash[ default_lib ].ou_type() ].can_have_users() ) ) { + try { + if (typeof g.my_libs_ou_hash[ default_lib ] == 'undefined') { default_lib = null; + } else { + if ( !get_bool( g.aout_hash[ g.my_libs_ou_hash[ default_lib ].ou_type() ].can_have_users() ) ) { + default_lib = null; + } } + } catch(E) { + dump('Error in ws_info.xul, render_menulist(): ' + E + '\n'); + default_lib = null; } g.ml = util.widgets.make_menulist( -- 2.11.0