st/mesa: fix crash with blit-based GetTexImage
authorMarek Olšák <maraeo@gmail.com>
Thu, 21 Mar 2013 23:31:47 +0000 (00:31 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 26 Mar 2013 00:28:19 +0000 (01:28 +0100)
https://bugs.freedesktop.org/show_bug.cgi?id=62573

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
src/mesa/state_tracker/st_cb_texture.c

index 94fbbf7bed88c82848af2fa1aed8a32e986a76f2..0cd0d77af22e79a600a1dfa1ab534b5c40fa4c52 100644 (file)
@@ -868,7 +868,7 @@ st_GetTexImage(struct gl_context * ctx,
       goto fallback;
    }
 
-   if (!stImage->pt) {
+   if (!stImage->pt || !src) {
       goto fallback;
    }