Reviewed by Chris.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2005 21:17:26 +0000 (21:17 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Feb 2005 21:17:26 +0000 (21:17 +0000)
        fix for <rdar://problem/4010028> 8A383: Safari v185 crash loading united.com multi city fare finder page.

        * khtml/dom/dom_string.cpp: (DOM::DOMString::operator += ): prevent nil dereference when DOMString being added is nil

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/dom/dom_string.cpp

index 90e62df0a833a414b33e401c048c0b1ab80de79a..66d18a559b0d24822fab35af2e99301a05e4906e 100644 (file)
@@ -1,3 +1,11 @@
+2005-02-17  Adele Amchan  <adele@apple.com>
+
+        Reviewed by Chris.
+
+        fix for <rdar://problem/4010028> 8A383: Safari v185 crash loading united.com multi city fare finder page.
+
+        * khtml/dom/dom_string.cpp: (DOM::DOMString::operator += ): prevent nil dereference when DOMString being added is nil
+
 2005-02-17  Jens Alfke  <jens@apple.com>
 
         Reviewed by Hyatt.
index 2132018718ac996fc743540d322867151f524ab7..fd610e14446f521470a09a2157c7b9401e00f1e5 100644 (file)
@@ -94,15 +94,15 @@ DOMString &DOMString::operator =(const DOMString &other)
 
 DOMString &DOMString::operator += (const DOMString &str)
 {
-    if(!impl)
-    {
-       // ### FIXME!!!
-       impl = str.impl;
-       impl->ref();
-       return *this;
-    }
     if(str.impl)
     {
+        if(!impl)
+        {
+            // ### FIXME!!!
+            impl = str.impl;
+            impl->ref();
+            return *this;
+        }
        DOMStringImpl *i = impl->copy();
        impl->deref();
        impl = i;