[Qt] Crash in ~GraphicsContext3D() when init failed
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 01:44:10 +0000 (01:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 01:44:10 +0000 (01:44 +0000)
commit02e1b5d8162c0984b14a3dee7ddbbd631363b9e3
tree8093b6b2f03ea53f173ad8847b4f0d529a20c77c
parent74a630947fad3b4fd15c036dc70587ae7c924fb0
[Qt] Crash in ~GraphicsContext3D() when init failed
https://bugs.webkit.org/show_bug.cgi?id=82992

Patch by Srikumar Bonda <srikumar.b@gmail.com> on 2012-04-03
Reviewed by Luiz Agostini.

WebKit crashes in ~GraphicsContext3D() while freeing the variables which are
not even allocated because of the init failure in GraphicsContext3D() for Qt.
In addition, Added a safety check in makeContextCurrent() before accessing
GraphicsContext3DPrivate object.

No new tests because the change is about adding null check
before accessing the variables.

* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::makeContextCurrent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp