Commit ba09afaf authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[BlackBerry] WebOverlay: check if platformContext is null

https://bugs.webkit.org/show_bug.cgi?id=114005

Patch by Anthony Scian <ascian@blackberry.com> on 2013-04-05
Reviewed by Carlos Garcia Campos.

RIM PR 256522
Internally reviewed by Mike Lattanzio.

The pointer returned by lockBufferDrawable can be null, so it
needs to be checked first before being used.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6bb926e8
......@@ -460,6 +460,10 @@ void WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded(LayerComposi
clearBuffer(textureContents, 0, 0, 0, 0);
PlatformGraphicsContext* platformContext = lockBufferDrawable(textureContents);
if (!platformContext) {
destroyBuffer(textureContents);
return;
}
double transform[] = {
1, 0,
0, 1,
......@@ -476,6 +480,10 @@ void WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded(LayerComposi
return;
PlatformGraphicsContext* platformContext = BlackBerry::Platform::Graphics::lockBufferDrawable(textureContents);
if (!platformContext) {
destroyBuffer(textureContents);
return;
}
AffineTransform transform;
platformContext->getTransform(reinterpret_cast<double*>(&transform));
......
2013-04-05 Anthony Scian <ascian@blackberry.com>
[BlackBerry] WebOverlay: check if platformContext is null
https://bugs.webkit.org/show_bug.cgi?id=114005
Reviewed by Carlos Garcia Campos.
RIM PR 256522
Internally reviewed by Mike Lattanzio.
The pointer returned by lockBufferDrawable can be null, so it
needs to be checked first before being used.
* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayLayerCompositingThreadClient::uploadTexturesIfNeeded):
2013-04-05 Benjamin Poulain <bpoulain@apple.com>
 
Remove WTFURL from WebKit
......
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