Fix crash after alt-tab (#16070)

This commit is contained in:
Michał Janiszewski authored and GitHub committed 2022-04-09 11:12:34 +01:00
1 parent e9213e3ecf
commit fd4e6bd031
1 file changed
+4
+4
View File
@@ -527,6 +527,10 @@ void lightfx_render_lights_to_frontbuffer()
continue;
}
// Clamp the reads to be no larger than the buffer size
bufReadHeight = std::min<uint32_t>(_pixelInfo.height, bufReadHeight);
bufReadWidth = std::min<uint32_t>(_pixelInfo.width, bufReadWidth);
bufWriteX = inRectCentreX - bufReadWidth / 2;
bufWriteY = inRectCentreY - bufReadHeight / 2;