renderer: return_if_fail() if the given texture size is 0

All renderers SEGV currently when that happens.
This commit is contained in:
Benjamin Otte 2023-05-21 01:27:09 +02:00 committed by Matthias Clasen
parent c9d6074198
commit 18482ac484

View File

@ -377,6 +377,8 @@ gsk_renderer_render_texture (GskRenderer *renderer,
gsk_render_node_get_bounds (root, &real_viewport);
viewport = &real_viewport;
}
g_return_val_if_fail (viewport->size.width > 0, NULL);
g_return_val_if_fail (viewport->size.height > 0, NULL);
texture = GSK_RENDERER_GET_CLASS (renderer)->render_texture (renderer, root, viewport);