From kde-commits Fri Jul 18 17:20:51 2008 From: Maks Orlovich Date: Fri, 18 Jul 2008 17:20:51 +0000 To: kde-commits Subject: KDE/kdelibs/khtml/ecma Message-Id: <1216401651.983682.17028.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121640166319189 SVN commit 834337 by orlovich: Merged revision 834328: 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 --- trunk/KDE/kdelibs/khtml/ecma/kjs_html.cpp #834336:834337 @@ -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