framebuffer: Bail out if the viewport has negative size
This commit is contained in:
parent
eb81ec945c
commit
19e1dcff23
@ -1413,6 +1413,10 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer,
|
||||
{
|
||||
float gl_viewport_y;
|
||||
|
||||
if (draw_buffer->viewport_width < 0
|
||||
|| draw_buffer->viewport_height < 0)
|
||||
return;
|
||||
|
||||
/* Convert the Cogl viewport y offset to an OpenGL viewport y offset
|
||||
* NB: OpenGL defines its window and viewport origins to be bottom
|
||||
* left, while Cogl defines them to be top left.
|
||||
|
Loading…
Reference in New Issue
Block a user