diff 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
line wrap: on
line diff
--- a/src/video/SDL_shape.c	Tue Aug 03 23:41:57 2010 -0400
+++ b/src/video/SDL_shape.c	Thu Aug 05 00:53:38 2010 -0400
@@ -22,6 +22,7 @@
 #include "SDL_config.h"
 
 #include "SDL.h"
+#include "SDL_assert.h"
 #include "SDL_video.h"
 #include "SDL_sysvideo.h"
 #include "SDL_pixels.h"
@@ -197,6 +198,7 @@
 }
 
 void SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) {
+	SDL_assert(tree != NULL);
 	if(tree->kind == QuadShape) {
 		SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft,function,closure);
 		SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upright,function,closure);