Fix a crash in QOpenGLTexture::allocateStorage()

QOpenGLTexture texture(QOpenGLTexture::Target2D);
texture.allocateStorage(); // crashed

Change-Id: Ia12f69b72e537cf765387cd172d7cb2cbbbad6e6
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Tasuku Suzuki 2014-05-20 15:04:35 +09:00 committed by The Qt Project
parent a591c27282
commit 390a8c36f7

View File

@ -2081,7 +2081,9 @@ int QOpenGLTexture::faces() const
void QOpenGLTexture::allocateStorage()
{
Q_D(QOpenGLTexture);
d->allocateStorage();
if (d->create()) {
d->allocateStorage();
}
}
/*!