summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/wgl/stw_ext_rendertexture.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_ext_rendertexture.c b/src/gallium/state_trackers/wgl/stw_ext_rendertexture.c
index 5eeb0df21f1..9d766966771 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_rendertexture.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_rendertexture.c
@@ -129,6 +129,12 @@ wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
* we do here.
*/
+ if (!curctx) {
+ debug_printf("No rendering context in wglBindTexImageARB()\n");
+ SetLastError(ERROR_INVALID_OPERATION);
+ return FALSE;
+ }
+
fb = stw_framebuffer_from_HPBUFFERARB(hPbuffer);
if (!fb) {
debug_printf("Invalid pbuffer handle in wglBindTexImageARB()\n");