Added safety checks for rendering, fixed crash in first level.

This commit is contained in:
Justin Marshall
2020-06-02 16:25:20 -07:00
parent e4b2ccf409
commit 22f3ea37de
4 changed files with 33 additions and 28 deletions
+3 -1
View File
@@ -1117,7 +1117,9 @@ inline void GraphicViewPortClass::Draw_Stamp(void const * icondata, int icon, in
if (drewit == 0) {
if (Lock()){
UnCachedIconsDrawn++;
Buffer_Draw_Stamp_Clip(this, icondata, icon, x_pixel, y_pixel, remap, WindowList[clip_window][WINDOWX], WindowList[clip_window][WINDOWY], WindowList[clip_window][WINDOWWIDTH], WindowList[clip_window][WINDOWHEIGHT]);
extern int ScreenHeight, ScreenWidth;
if(y_pixel < ScreenHeight && x_pixel < ScreenWidth)
Buffer_Draw_Stamp_Clip(this, icondata, icon, x_pixel, y_pixel, remap, WindowList[clip_window][WINDOWX], WindowList[clip_window][WINDOWY], WindowList[clip_window][WINDOWWIDTH], WindowList[clip_window][WINDOWHEIGHT]);
}
}
Unlock();