From c646a80b53a75ba044d74f22d391791190660560 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 11 Oct 2008 22:16:39 +0000 Subject: Actual fix for bug #17819, that doesn't disable the functionality, crash with tiled image textures in the game engine. --- source/blender/gpu/intern/gpu_draw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 8fcf0457812..2cd548afe52 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -359,6 +359,8 @@ int GPU_verify_image(Image *ima, int tftile, int tfmode, int compare) else GTS.tile= tftile; + GTS.tile = MAX2(0, GTS.tile); + if(ima) { GTS.tileXRep = ima->xrep; GTS.tileYRep = ima->yrep; @@ -448,9 +450,6 @@ int GPU_verify_image(Image *ima, int tftile, int tfmode, int compare) /* for tiles, copy only part of image into buffer */ if (GTS.tilemode) { - return 0; //disabled for now, it causes crashes - //see http://projects.blender.org/tracker/index.php?func=detail&aid=17819&group_id=9&atid=125 - tilerect= MEM_mallocN(rectw*recth*sizeof(*tilerect), "tilerect"); for (y=0; y