RESOLVED FIXED 114674
[BlackBerry] LayerTexture: check if the graphics context is NULL
https://bugs.webkit.org/show_bug.cgi?id=114674
Summary [BlackBerry] LayerTexture: check if the graphics context is NULL
Alberto Garcia
Reported 2013-04-16 02:27:55 PDT
lockBufferDrawable() can return a null pointer, so it should be checked first.
Attachments
Patch (1.51 KB, patch)
2013-04-16 02:31 PDT, Alberto Garcia
no flags
Patch (1.66 KB, patch)
2013-04-16 08:44 PDT, Alberto Garcia
no flags
Alberto Garcia
Comment 1 2013-04-16 02:31:00 PDT
Rob Buis
Comment 2 2013-04-16 04:50:48 PDT
Comment on attachment 198280 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=198280&action=review > Source/WebCore/platform/graphics/blackberry/LayerTexture.cpp:-70 > - gc->addFillRect(BlackBerry::Platform::FloatRect(0, 0, 1, 1)); Why was this never a problem before? Did the semantics of lockBufferDrawable change? > Source/WebCore/platform/graphics/blackberry/LayerTexture.cpp:69 > + if (gc) { It is WebKit style to put the temp var declaration in the if.
Alberto Garcia
Comment 3 2013-04-16 08:44:43 PDT
Created attachment 198333 [details] Patch (In reply to comment #2) > > Source/WebCore/platform/graphics/blackberry/LayerTexture.cpp:-70 > > - gc->addFillRect(BlackBerry::Platform::FloatRect(0, 0, 1, 1)); > Why was this never a problem before? Did the semantics of > lockBufferDrawable change? They didn't, it can actually return a null pointer. I don't think it's the case here anyway but see also bug 114005. > > Source/WebCore/platform/graphics/blackberry/LayerTexture.cpp:69 > > + if (gc) { > It is WebKit style to put the temp var declaration in the if. Ok, fixed.
Rob Buis
Comment 4 2013-04-16 08:46:53 PDT
Comment on attachment 198333 [details] Patch LGTM.
WebKit Commit Bot
Comment 5 2013-04-16 09:14:45 PDT
Comment on attachment 198333 [details] Patch Clearing flags on attachment: 198333 Committed r148516: <http://trac.webkit.org/changeset/148516>
WebKit Commit Bot
Comment 6 2013-04-16 09:14:47 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.