mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-22 16:51:13 +00:00
Fix bug memory acess
Bitmap is not initialized before use, that cause segmentation fault on function use it. Fix by allocate memory before use.
This commit is contained in:
parent
707e9397ca
commit
3e64fec9f4
|
@ -103,7 +103,7 @@ DirectFB_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowSh
|
|||
dsc.pixelformat = DSPF_ARGB;
|
||||
|
||||
SDL_DFB_CHECKERR(devdata->dfb->CreateSurface(devdata->dfb, &dsc, &data->surface));
|
||||
|
||||
SDL_DFB_CALLOC(bitmap, shape->w * shape->h, 1);
|
||||
/* Assume that shaper->alphacutoff already has a value, because SDL_SetWindowShape() should have given it one. */
|
||||
SDL_CalculateShapeBitmap(shaper->mode, shape, bitmap, 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue