Mercurial > sdl-ios-xcode
comparison src/video/SDL_shape.c @ 4832:0c82f20327ec
Correcting minor bugs and adding assertions to help me track down a NULL pointer bug in Cocoa code.
author | egottlieb |
---|---|
date | Thu, 05 Aug 2010 00:53:38 -0400 |
parents | 3dfe779900f5 |
children | fd5bb97ec05d |
comparison
equal
deleted
inserted
replaced
4831:8dabd625079f | 4832:0c82f20327ec |
---|---|
20 eligottlieb@gmail.com | 20 eligottlieb@gmail.com |
21 */ | 21 */ |
22 #include "SDL_config.h" | 22 #include "SDL_config.h" |
23 | 23 |
24 #include "SDL.h" | 24 #include "SDL.h" |
25 #include "SDL_assert.h" | |
25 #include "SDL_video.h" | 26 #include "SDL_video.h" |
26 #include "SDL_sysvideo.h" | 27 #include "SDL_sysvideo.h" |
27 #include "SDL_pixels.h" | 28 #include "SDL_pixels.h" |
28 #include "SDL_surface.h" | 29 #include "SDL_surface.h" |
29 #include "SDL_shape.h" | 30 #include "SDL_shape.h" |
195 SDL_UnlockSurface(shape); | 196 SDL_UnlockSurface(shape); |
196 return result; | 197 return result; |
197 } | 198 } |
198 | 199 |
199 void SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) { | 200 void SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) { |
201 SDL_assert(tree != NULL); | |
200 if(tree->kind == QuadShape) { | 202 if(tree->kind == QuadShape) { |
201 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft,function,closure); | 203 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft,function,closure); |
202 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upright,function,closure); | 204 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upright,function,closure); |
203 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downleft,function,closure); | 205 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downleft,function,closure); |
204 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downright,function,closure); | 206 SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downright,function,closure); |