Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added magic to detect already freed or otherwise invalid windows and …

…textures.
  • Loading branch information
slouken committed Jan 24, 2010
1 parent 6521708 commit 09b63148ecfc98d8cee6fc6b9a95eec7c33720d9
Showing with 128 additions and 131 deletions.
  1. +4 −0 src/video/SDL_sysvideo.h
  2. +124 −131 src/video/SDL_video.c
@@ -37,6 +37,7 @@ typedef struct SDL_VideoDevice SDL_VideoDevice;
/* Define the SDL texture structure */
struct SDL_Texture
{
const void *magic;
Uint32 format; /**< The pixel format of the texture */
int access; /**< SDL_TextureAccess */
int w; /**< The width of the texture */
@@ -138,6 +139,7 @@ struct SDL_RenderDriver
/* Define the SDL window structure, corresponding to toplevel windows */
struct SDL_Window
{
const void *magic;
Uint32 id;
char *title;
int x, y;
@@ -308,6 +310,8 @@ struct SDL_VideoDevice
int num_displays;
SDL_VideoDisplay *displays;
int current_display;
Uint8 window_magic;
Uint8 texture_magic;
Uint32 next_object_id;

/* * * */

0 comments on commit 09b6314

Please sign in to comment.