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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/html
From:       Maks Orlovich <maksim () kde ! org>
Date:       2006-02-17 4:20:06
Message-ID: 1140150006.597829.21083.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 510381 by orlovich:

Fix #115534. Didn't realize deref could flush other images, too.
BUG:115534


 M  +3 -2      html_imageimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_imageimpl.cpp #510380:510381
@@ -91,11 +91,12 @@
         if (!url.isEmpty()) { //### why do we not hide or something when setting this?
             CachedImage* newImage = getDocument()->docLoader()->requestImage(khtml::parseURL(url));
             if (newImage && newImage != m_image) {
+                CachedImage* oldImage = m_image;
                 loadEventSent = false;
-                if (m_image)
-                    m_image->deref(this);
                 m_image = newImage;
                 m_image->ref(this);
+                if (oldImage)
+                    oldImage->deref(this);
             }
         }
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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