Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 26273006: Check lockPixel failure in SkBitmapProcState (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.cpp
===================================================================
--- src/core/SkBitmapProcState.cpp (revision 11394)
+++ src/core/SkBitmapProcState.cpp (working copy)
@@ -159,6 +159,9 @@
fScaledBitmap);
}
fScaledBitmap.lockPixels(); // wonder if Resize() should have locked this
+ if (!fScaledBitmap.getPixel()) {
+ return false;
+ }
fBitmap = &fScaledBitmap;
// set the inv matrix type to translate-only;
@@ -293,6 +296,9 @@
}
}
fScaledBitmap.lockPixels(); // just 'cause the cache made a copy :(
+ if (!fScaledBitmap.getPixel()) {
+ return false;
+ }
fBitmap = &fScaledBitmap;
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698