Commit d45cc30a authored by mrowe@apple.com's avatar mrowe@apple.com

2008-06-22 kuchhal <kuchhal@yahoo.com>

        Reviewed by Darin Adler.

        Fix https://bugs.webkit.org/show_bug.cgi?id=19696
        Bug 19696: Memory leak in WebCore/editing/DeleteButtonController.cpp

        * editing/DeleteButtonController.cpp:
        (WebCore::DeleteButtonController::createDeletionUI): Delete the Image instance
        if the platform resource could not be loaded.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 754a8fb6
2008-06-22 kuchhal <kuchhal@yahoo.com>
Reviewed by Darin Adler.
Fix https://bugs.webkit.org/show_bug.cgi?id=19696
Bug 19696: Memory leak in WebCore/editing/DeleteButtonController.cpp
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Delete the Image instance
if the platform resource could not be loaded.
2008-06-22 kuchhal <kuchhal@yahoo.com>
Reviewed by Darin Adler.
......@@ -196,8 +196,10 @@ void DeleteButtonController::createDeletionUI()
style->setProperty(CSSPropertyHeight, String::number(buttonHeight) + "px");
Image* buttonImage = Image::loadPlatformResource("deleteButton");
if (buttonImage->isNull())
if (buttonImage->isNull()) {
delete buttonImage;
return;
}
button->setCachedImage(new CachedImage(buttonImage));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment