More crash fix attempts...
This commit is contained in:
parent
93f05fd5c7
commit
d3643b85ba
6
rc.c
6
rc.c
|
@ -5755,7 +5755,10 @@ SDL_Surface *grabbehind(sprite_t *s, SDL_Surface *surf) {
|
||||||
SDL_Rect area;
|
SDL_Rect area;
|
||||||
|
|
||||||
// create buffer for player background
|
// create buffer for player background
|
||||||
if (surf) SDL_FreeSurface(surf);
|
if (surf) {
|
||||||
|
SDL_FreeSurface(surf);
|
||||||
|
surf = NULL;
|
||||||
|
}
|
||||||
surf = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
surf = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
||||||
s->img->w, s->img->h,
|
s->img->w, s->img->h,
|
||||||
screen->format->BitsPerPixel, screen->format->Rmask,
|
screen->format->BitsPerPixel, screen->format->Rmask,
|
||||||
|
@ -8559,6 +8562,7 @@ void keeponscreen(sprite_t *s) {
|
||||||
void stopteleporting(sprite_t *s) {
|
void stopteleporting(sprite_t *s) {
|
||||||
if (s->allocimg) {
|
if (s->allocimg) {
|
||||||
SDL_FreeSurface(s->img);
|
SDL_FreeSurface(s->img);
|
||||||
|
s->img = NULL;
|
||||||
}
|
}
|
||||||
s->allocimg = B_FALSE;
|
s->allocimg = B_FALSE;
|
||||||
s->teleporting = 0;
|
s->teleporting = 0;
|
||||||
|
|
Loading…
Reference in New Issue