Fix glPixelStore in GLTexture::update

Resetting glPixelStore is bound to the variable useUnpack, but setting
was only bound to a subset of the checks going into useUnpack variable.
This could cause an assert if one updated with a QImage not in format
ARGB32_Premultiplied.

REVIEW: 122521
This commit is contained in:
Martin Gräßlin 2015-02-11 11:09:50 +01:00
parent 7b5cf8bcdc
commit d344b6cc3d

View file

@ -338,7 +338,7 @@ void GLTexture::update(const QImage &image, const QPoint &offset, const QRect &s
QImage tmpImage;
if (!src.isNull()) {
if (d->s_supportsUnpack) {
if (useUnpack) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width());
glPixelStorei(GL_UNPACK_SKIP_PIXELS, src.x());
glPixelStorei(GL_UNPACK_SKIP_ROWS, src.y());