[chromium] Fix crash in DragImageTest caused by r122996
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 19:51:12 +0000 (19:51 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jul 2012 19:51:12 +0000 (19:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=91653

Patch by Varun Jain <varunjain@chromium.org> on 2012-07-18
Reviewed by Tony Chang.

Covered by existing DragImageTest.

* platform/chromium/DragImageChromiumSkia.cpp:
(WebCore::deleteDragImage):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/chromium/DragImageChromiumSkia.cpp

index 0c7aea8f23564e04c005c81bc5d000c66f125577..27580a85d2f738f82e7208d2e32042d0f66206a5 100644 (file)
@@ -1,3 +1,15 @@
+2012-07-18  Varun Jain  <varunjain@chromium.org>
+
+        [chromium] Fix crash in DragImageTest caused by r122996
+        https://bugs.webkit.org/show_bug.cgi?id=91653
+
+        Reviewed by Tony Chang.
+
+        Covered by existing DragImageTest.
+
+        * platform/chromium/DragImageChromiumSkia.cpp:
+        (WebCore::deleteDragImage):
+
 2012-07-18  Varun Jain  <varunjain@chromium.org>
 
         [chromium] Drag image for image elements should be scaled with device scale factor.
index c106c86012030c20ce916f327e08b689d813ac34..dd8ace385c248308fb6b301a42efa89e7364f325 100644 (file)
@@ -52,7 +52,8 @@ IntSize dragImageSize(DragImageRef image)
 
 void deleteDragImage(DragImageRef image)
 {
-    delete image->bitmap;
+    if (image)
+        delete image->bitmap;
     delete image;
 }