1
0
Fork 0

framebuffer: Bail out if the viewport has negative size

This commit is contained in:
Emmanuele Bassi 2011-05-25 16:49:09 +01:00
parent eb81ec945c
commit 19e1dcff23

View file

@ -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.