Added a check for badly defined scissor rectangles that caused a crash when resizing the window with dx11 backend

This commit is contained in:
fs 2025-03-24 15:46:34 +02:00 committed by Peter Slattery
parent 9e58435637
commit 27b4626907
1 changed files with 3 additions and 0 deletions

View File

@ -560,6 +560,9 @@ gl_render(Render_Target *t){
group = group->next){
Rect_i32 box = Ri32(group->clip_box);
// NOTE(FS): Ignore this group if we our scissor rectangle is not well defined
if ((rect_width(box) <= 0) || (rect_height(box) <= 0)) continue;
D3D11_RECT group_scissor = { };
group_scissor.left = box.x0;
group_scissor.right = box.x1;