During screen attach/detach, we may end up in a situation where the window has a 0x0 size, and we end up painting to the window, in which case we were trying to create an IOSurface of size 0x0. This resulted in the creation failing, triggering an assert. We now guard the surface creation with a check for the backing store size being non-empty, and for empty sizes we fall back to a plain null-QImage for our paint device. Fixes: QTBUG-128731 Pick-to: 6.5 6.2 Invaluable-research-by: Viktor Arvidsson Change-Id: I06ea582c87fb0d359387ef9495451801612701c9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 58caa18d2ff1a67e16f960f5bd6b804cdaec4063) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%