Fixed <rdar://problem/4003251> Safari crashed at www.icelandair.com in LiveConnect...
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Feb 2005 01:13:50 +0000 (01:13 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Feb 2005 01:13:50 +0000 (01:13 +0000)
Added nil check.

        Reviewed by John Sullivan.

        * bindings/jni/jni_runtime.cpp:
        (JavaField::valueFromInstance):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/bindings/jni/jni_runtime.cpp

index 2ae86328bf6e46e54a4fc8a6940ac83a663881bc..1367f81fb872a3af5059d863cd263a2cf47ca904 100644 (file)
@@ -1,3 +1,14 @@
+2005-02-17  Richard Williamson   <rjw@apple.com>
+
+       Fixed <rdar://problem/4003251> Safari crashed at www.icelandair.com in LiveConnect code converting a Java object to a string
+
+       Added nil check.
+
+        Reviewed by John Sullivan.
+
+        * bindings/jni/jni_runtime.cpp:
+        (JavaField::valueFromInstance):
+
 === Safari-187 ===
 
 2005-02-11  Richard Williamson   <rjw@apple.com>
index 81d9668f6a57c3fcfa48e0778d21cb8b09f8e12b..98b1994d1553255c78e49e9ffeaca72cfc32b5cf 100644 (file)
@@ -120,7 +120,7 @@ KJS::Value JavaField::valueFromInstance(KJS::ExecState *exec, const Instance *i)
             if (arrayType[0] == '[') {
                 jsresult = JavaArray::convertJObjectToArray (exec, anObject, arrayType, instance->executionContext());
             }
-            else {
+            else if (anObject != 0){
                jsresult = Instance::createRuntimeObject(Instance::JavaLanguage, anObject, instance->executionContext());
             }
         }