[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/khtml/ecma
From:       Maks Orlovich <maksim () kde ! org>
Date:       2008-07-18 17:00:39
Message-ID: 1216400439.401645.16211.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 834328 by orlovich:

Don't assume the body exists here; it doesn't have to in early inline scripts.
Fixes crash on https://metanet.ucm.es 
CCBUG:166944


 M  +5 -5      kjs_html.cpp  


--- branches/KDE/4.1/kdelibs/khtml/ecma/kjs_html.cpp #834327:834328
@@ -393,15 +393,15 @@
     case DesignMode:
         return jsString((doc.designMode() ? "on":"off"));
     case BgColor:
-      return jsString(body->getAttribute(ATTR_BGCOLOR));
+      return jsString(body ? body->getAttribute(ATTR_BGCOLOR) : DOMString());
     case FgColor:
-      return jsString(body->getAttribute(ATTR_TEXT));
+      return jsString(body ? body->getAttribute(ATTR_TEXT) : DOMString());
     case AlinkColor:
-      return jsString(body->getAttribute(ATTR_ALINK));
+      return jsString(body ? body->getAttribute(ATTR_ALINK) : DOMString());
     case LinkColor:
-      return jsString(body->getAttribute(ATTR_LINK));
+      return jsString(body ? body->getAttribute(ATTR_LINK) : DOMString());
     case VlinkColor:
-      return jsString(body->getAttribute(ATTR_VLINK));
+      return jsString(body ? body->getAttribute(ATTR_VLINK) : DOMString());
     case LastModified:
       return jsString(doc.lastModified());
     case Height: // NS-only, not available in IE
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic