Bug 4844485: Add null check for boxObject, r=mfinkle
authorBen Combee <combee@mozilla.com>
Fri, 20 Mar 2009 18:41:55 -0400
changeset 65139 55259dbebebfedd664e9f60f35acab349f696127
parent 65138 30eba8e7b6e1ab844ba0764f8e6ab392919fcb92
child 65140 f33eca6fa1d03eee19aa5a0f16b240e2e9741ce5
push idunknown
push userunknown
push dateunknown
reviewersmfinkle
bugs4844485
Bug 4844485: Add null check for boxObject, r=mfinkle
mobile/chrome/content/InputHandler.js
--- a/mobile/chrome/content/InputHandler.js
+++ b/mobile/chrome/content/InputHandler.js
@@ -46,17 +46,17 @@ function getScrollboxFromElement(elem) {
   let scrollbox = null;
 
   while (elem.parentNode) {
     try {
       if ("scrollBoxObject" in elem && elem.scrollBoxObject) {
         scrollbox = elem.scrollBoxObject;
         break;
       }
-      else {
+      else if (elem.boxObject) {
         scrollbox = elem.boxObject.QueryInterface(Ci.nsIScrollBoxObject);
         break;
       }
     }
     catch (e) {
       // an exception is OK, we just don't want to propogate it
     }
     elem = elem.parentNode;