mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add NULL checks and asserts to graphic options
The game dereferences graphics.screenbuffer without checking it first... it's unlikely to happen, but the least we can to do be safe is to add a check and assert here.
This commit is contained in:
@@ -445,6 +445,12 @@ static void menuactionpress(void)
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case Menu::graphicoptions:
|
||||
if (graphics.screenbuffer == NULL)
|
||||
{
|
||||
SDL_assert(0 && "Screenbuffer is NULL!");
|
||||
break;
|
||||
}
|
||||
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user