mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-17 17:00:29 +02:00
Added safety checks for rendering, fixed crash in first level.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user