mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 05:06:46 -05:00
Improved bug #759
Don't crash if creating the X image failed. --HG-- branch : SDL-1.2
This commit is contained in:
@@ -1196,7 +1196,10 @@ SDL_Surface *X11_SetVideoMode(_THIS, SDL_Surface *current,
|
||||
current->w = width;
|
||||
current->h = height;
|
||||
current->pitch = SDL_CalculatePitch(current);
|
||||
X11_ResizeImage(this, current, flags);
|
||||
if (X11_ResizeImage(this, current, flags) < 0) {
|
||||
current = NULL;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear these flags and set them only if they are in the new set. */
|
||||
|
||||
Reference in New Issue
Block a user