From c35f184eac3fdba5c7c9efe1b2937498650ea050 Mon Sep 17 00:00:00 2001 From: "ben%netscape.com" Date: Tue, 30 Oct 2001 06:42:41 +0000 Subject: [PATCH] 107311 - add null check r=jst, sr=sspitzer git-svn-id: svn://10.0.0.236/trunk@106656 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/communicator/resources/content/nsContextMenu.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/xpfe/communicator/resources/content/nsContextMenu.js b/mozilla/xpfe/communicator/resources/content/nsContextMenu.js index 21cad15af3c..2a78f2cdb7a 100644 --- a/mozilla/xpfe/communicator/resources/content/nsContextMenu.js +++ b/mozilla/xpfe/communicator/resources/content/nsContextMenu.js @@ -520,7 +520,8 @@ nsContextMenu.prototype = { // Show/hide one item (specified via name or the item element itself). showItem : function ( itemOrId, show ) { var item = itemOrId.constructor == String ? document.getElementById(itemOrId) : itemOrId; - item.hidden = !show; + if (item) + item.hidden = !show; }, // Set given attribute of specified context-menu item. If the // value is null, then it removes the attribute (which works