From kde-commits Tue Mar 13 10:47:44 2007 From: Harri Porten Date: Tue, 13 Mar 2007 10:47:44 +0000 To: kde-commits Subject: branches/KDE/3.5/kdelibs/kjs Message-Id: <1173782864.134022.3955.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=117391045224689 SVN commit 642090 by porten: null pointer check that hopefully fixes gmail crash. Even if it does a different behavior can't be ruled out as the .caller property is appearantly being used which was not present before. CCMAIL: 142773@bugs.kde.org M +4 -4 function.cpp --- branches/KDE/3.5/kdelibs/kjs/function.cpp #642089:642090 @@ -267,7 +267,7 @@ exec->setException(err); free(decbuf); return UString(); - } + } unsigned long wwww = octets[1] & 0x0F; unsigned long xx = (octets[2] >> 4) & 0x03; unsigned long yyyy = octets[2] & 0x0F; @@ -515,9 +515,9 @@ ContextImp *context = exec->context().imp(); while (context) { if (context->function() == this) { - FunctionImp *f = context->callingContext()->function(); - if (f) - return Value(f); + ContextImp *cc = context->callingContext(); + if (cc && cc->function()) + return Value(cc->function()); else return Null(); }