mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Defensively recreate title drawlist
Avoids a crash when connecting to a server in the Intro
This commit is contained in:
parent
2c36a8cefe
commit
64d0649c90
1 changed files with 9 additions and 0 deletions
|
|
@ -2015,6 +2015,15 @@ void F_TitleScreenDrawer(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
luahook:
|
luahook:
|
||||||
|
// The title drawer is sometimes called without first being started
|
||||||
|
// In order to avoid use-before-initialization crashes, let's check and
|
||||||
|
// create the drawlist if it doesn't exist.
|
||||||
|
if (!LUA_HUD_IsDrawListValid(luahuddrawlist_title))
|
||||||
|
{
|
||||||
|
LUA_HUD_DestroyDrawList(luahuddrawlist_title);
|
||||||
|
luahuddrawlist_title = LUA_HUD_CreateDrawList();
|
||||||
|
}
|
||||||
|
|
||||||
if (renderisnewtic)
|
if (renderisnewtic)
|
||||||
{
|
{
|
||||||
LUA_HUD_ClearDrawList(luahuddrawlist_title);
|
LUA_HUD_ClearDrawList(luahuddrawlist_title);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue