diff options
Diffstat (limited to 'tests/sdl_surface_refcount.c')
-rw-r--r-- | tests/sdl_surface_refcount.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/sdl_surface_refcount.c b/tests/sdl_surface_refcount.c new file mode 100644 index 00000000..4e9b4896 --- /dev/null +++ b/tests/sdl_surface_refcount.c @@ -0,0 +1,14 @@ +#include <SDL.h> + +int main(int argc, char *argv[]) +{ + SDL_Init(SDL_INIT_VIDEO); + SDL_Surface *screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE); + SDL_Surface *reference = screen; + reference->refcount++; + SDL_FreeSurface(screen); + SDL_FreeSurface(reference); + int result = 1; + REPORT_RESULT(); + return 0; +} |