Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11video.c @ 4253:b0c979816d67 SDL-1.2
Improved bug #759
Don't crash if creating the X image failed.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 27 Sep 2009 22:29:13 +0000 |
parents | 50b4ab8f8271 |
children | 62849663f20a |
comparison
equal
deleted
inserted
replaced
4252:052dc40d917f | 4253:b0c979816d67 |
---|---|
1194 if ( ((current->w != width) || (current->h != height)) || | 1194 if ( ((current->w != width) || (current->h != height)) || |
1195 ((saved_flags&SDL_OPENGL) != (flags&SDL_OPENGL)) ) { | 1195 ((saved_flags&SDL_OPENGL) != (flags&SDL_OPENGL)) ) { |
1196 current->w = width; | 1196 current->w = width; |
1197 current->h = height; | 1197 current->h = height; |
1198 current->pitch = SDL_CalculatePitch(current); | 1198 current->pitch = SDL_CalculatePitch(current); |
1199 X11_ResizeImage(this, current, flags); | 1199 if (X11_ResizeImage(this, current, flags) < 0) { |
1200 current = NULL; | |
1201 goto done; | |
1202 } | |
1200 } | 1203 } |
1201 | 1204 |
1202 /* Clear these flags and set them only if they are in the new set. */ | 1205 /* Clear these flags and set them only if they are in the new set. */ |
1203 current->flags &= ~(SDL_RESIZABLE|SDL_NOFRAME); | 1206 current->flags &= ~(SDL_RESIZABLE|SDL_NOFRAME); |
1204 current->flags |= (flags&(SDL_RESIZABLE|SDL_NOFRAME)); | 1207 current->flags |= (flags&(SDL_RESIZABLE|SDL_NOFRAME)); |