valgrind FTW!
authorSam Lantinga <slouken@libsdl.org>
Mon, 24 Oct 2011 23:00:09 -0400
changeset 6028 869b6723e1fc
parent 6027 56185b574d61
child 6029 4a8bbaa52b9b
valgrind FTW!
src/video/cocoa/SDL_cocoavideo.m
--- a/src/video/cocoa/SDL_cocoavideo.m	Mon Oct 24 15:33:58 2011 -0400
+++ b/src/video/cocoa/SDL_cocoavideo.m	Mon Oct 24 23:00:09 2011 -0400
@@ -193,7 +193,7 @@
     SDL_FreeSurface(converted);
 
     /* Premultiply the alpha channel */
-    for (i = (converted->h * converted->w); i--; ) {
+    for (i = (surface->h * surface->w); i--; ) {
         Uint8 alpha = pixels[3];
         pixels[0] = (Uint8)(((Uint16)pixels[0] * alpha) / 255);
         pixels[1] = (Uint8)(((Uint16)pixels[1] * alpha) / 255);