diff options
author | Ben Murdoch <benm@google.com> | 2011-10-17 11:37:06 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-17 11:37:06 -0700 |
commit | 8241dc8d1c1f9e8cfe4c900964dc7d564eb48000 (patch) | |
tree | 182c428c64aa2c14e4b775d8b09db80af5c8face | |
parent | 54c45f23c24446f5e165f63383a31016f56dfd75 (diff) | |
parent | 50dfa6485ba2846de19ccb19bda0872ced920e17 (diff) | |
download | external_webkit-8241dc8d1c1f9e8cfe4c900964dc7d564eb48000.zip external_webkit-8241dc8d1c1f9e8cfe4c900964dc7d564eb48000.tar.gz external_webkit-8241dc8d1c1f9e8cfe4c900964dc7d564eb48000.tar.bz2 |
Merge "Fix crash in ImageBufferAndroid."
-rw-r--r-- | Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp b/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp index bbde998..691fbca 100644 --- a/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp @@ -85,11 +85,9 @@ PassRefPtr<Image> ImageBuffer::copyImage() const SkDevice* device = canvas->getDevice(); const SkBitmap& orig = device->accessBitmap(false); - if (!PlatformBridge::canSatisfyMemoryAllocation(orig.getSize())) - return 0; - SkBitmap copy; - orig.copyTo(©, orig.config()); + if (PlatformBridge::canSatisfyMemoryAllocation(orig.getSize())) + orig.copyTo(©, orig.config()); SkBitmapRef* ref = new SkBitmapRef(copy); RefPtr<Image> image = BitmapImage::create(ref, 0); |