#include "main/api_exec.h"
#include "main/context.h"
#include "main/extensions.h"
+#include "main/fbobject.h"
#include "main/formats.h"
#include "main/framebuffer.h"
#include "main/imports.h"
{
GLsizei width, height;
- if (!fb)
+ if (!fb || fb == _mesa_get_incomplete_framebuffer())
return;
get_window_size(fb, &width, &height);
mesaDraw = &draw->Base;
mesaRead = &read->Base;
}
+ else {
+ struct gl_framebuffer *incomplete
+ = _mesa_get_incomplete_framebuffer();
+ mesaDraw = incomplete;
+ mesaRead = incomplete;
+ }
/* check for same context and buffer */
if (mesaCtx == _mesa_get_current_context()