From 6c2c44ddc907a3d01aed368db4b98802989b5149 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 23 May 2001 00:06:08 +0000 Subject: [PATCH] Minor crash bugfix --- src/video/SDL_video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 6c95b1fdc..a9470b35a 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1134,6 +1134,9 @@ int SDL_SetPalette(SDL_Surface *screen, int which, int gotall; int palsize; + if ( ! current_video ) { + return 0; + } if ( screen != SDL_PublicSurface ) { /* only screens have physical palettes */ which &= ~SDL_PHYSPAL;