diff src/video/photon/SDL_ph_image.c @ 283:3d8b6b9f1e18

Date: Mon, 18 Feb 2002 16:46:59 +1200 From: Julian Kinraid <jkinraid@clear.net.nz> Subject: Patches for photon port of SDL Hi, A couple more patches for photon and the nto audio. Adds mouse grabbing support, fixed cursor images, unicode keyboard events (though no unicode data on kye release, is that a problem?), hopefully fixing some audio lag problems, and a few other fixes. Thanks, Julian Kinraid
author Sam Lantinga <slouken@libsdl.org>
date Wed, 20 Feb 2002 01:05:51 +0000
parents c6abdda2f666
children 68a8a8237c09
line wrap: on
line diff
--- a/src/video/photon/SDL_ph_image.c	Wed Feb 20 01:02:33 2002 +0000
+++ b/src/video/photon/SDL_ph_image.c	Wed Feb 20 01:05:51 2002 +0000
@@ -175,8 +175,10 @@
 
 void ph_DestroyImage(_THIS, SDL_Surface *screen)
 {
+#if 0
    if(SDL_Image == NULL)
      return;
+#endif
 
    if (OCImage.offscreen_context != NULL)
    {
@@ -188,21 +190,21 @@
       OCImage.FrameData1 = NULL;
    }
 
-	if (SDL_Image->image)
+	if (SDL_Image)
 	{
                 // SDL_Image->flags=Ph_RELEASE_IMAGE;
                 // PhReleaseImage(SDL_Image);
-                PgShmemDestroy(SDL_Image->image); // Use this if you using shared memory, or uncomment
+		if (SDL_Image->image)
+			PgShmemDestroy(SDL_Image->image); // Use this if you using shared memory, or uncomment
                                                   // lines above if not (and comment this line ;-)
                 free(SDL_Image);
+		SDL_Image = NULL;
 	}
 
 	if ( screen )
         {
     	        screen->pixels = NULL;
 	}
-	
-	SDL_Image = NULL;
 }
 
 int ph_ResizeImage(_THIS, SDL_Surface *screen, Uint32 flags)