linuxfb: Do not crash with GL windows

We will show an error message saying no platform context is available
but the crash (due to GL windows having a null backingstore) is not
desirable.

Change-Id: Iba3a61bfc4eeeb89b4a0017a58c87a7dbd0895e7
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
This commit is contained in:
Laszlo Agocs 2013-10-15 12:49:45 +02:00 committed by The Qt Project
parent 557fe401ac
commit b7d2882715

View File

@ -258,8 +258,9 @@ QRegion QFbScreen::doRedraw()
QRect windowRect = mWindowStack[layerIndex]->geometry().translated(-screenOffset);
QRect windowIntersect = rect.translated(-windowRect.left(),
-windowRect.top());
mCompositePainter->drawImage(rect, mWindowStack[layerIndex]->backingStore()->image(),
windowIntersect);
QFbBackingStore *backingStore = mWindowStack[layerIndex]->backingStore();
if (backingStore)
mCompositePainter->drawImage(rect, backingStore->image(), windowIntersect);
if (firstLayer) {
firstLayer = false;
}