iOS: Guard against displayLayer after platform window is gone

During shutdown the UIView might outlive its QIOSWindow platform
window. If we receive displayLayer calls, we need to bail out,
to avoid crashing when trying to send the expose event.

Pick-to: 6.7 6.6 6.5
Change-Id: I2f36a4dd825e91b348bc57a06e6aa6b1a12fd249
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Tor Arne Vestbø 2024-02-05 15:17:52 +01:00
parent 781135b0d2
commit 483523ad9f

View File

@ -263,6 +263,9 @@ inline ulong getTimeStamp(UIEvent *event)
Q_UNUSED(layer);
Q_ASSERT(layer == self.layer);
if (!self.platformWindow)
return;
[self sendUpdatedExposeEvent];
}