Crash fix

This commit is contained in:
kichikuou
2016-04-02 17:46:31 +09:00
parent b716e76734
commit 4be0695ec3
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -453,6 +453,8 @@ void AGS::invalidate_screen(int sx, int sy, int width, int height)
{
SDL_UnlockSurface(hBmpDest);
uint32* pixels = surface_line(hBmpDest, screen_height == 400 ? sy + (scroll - 400) : sy) + sx;
if (sy + height > screen_height)
height = screen_height - sy;
SDL_Rect rect = {sx, sy, width, height};
SDL_UpdateTexture(sdlTexture, &rect, pixels, hBmpDest->pitch);
SDL_RenderClear(sdlRenderer);