Improved bug #759
Don't crash if creating the X image failed. --HG-- branch : SDL-1.2 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403924
This commit is contained in:
parent
b3d7109c38
commit
f0e159b32a
1 changed files with 4 additions and 1 deletions
|
@ -1196,7 +1196,10 @@ SDL_Surface *X11_SetVideoMode(_THIS, SDL_Surface *current,
|
||||||
current->w = width;
|
current->w = width;
|
||||||
current->h = height;
|
current->h = height;
|
||||||
current->pitch = SDL_CalculatePitch(current);
|
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. */
|
/* Clear these flags and set them only if they are in the new set. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue