mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Mapster32: fix a crash when m32_settings.cfg contains video setting.
Such as "vid_gamma". In that case, setbrightness() would have been called without basepaltableptr having been initialized. The fix is by moving the preparational setbasepaltable() call from ExtPostStartupWindow() to ExtInit(), just before the OSD command dispatching. git-svn-id: https://svn.eduke32.com/eduke32@4573 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
63916ee8d1
commit
9969efd8d1
1 changed files with 5 additions and 2 deletions
|
@ -9807,6 +9807,11 @@ int32_t ExtInit(void)
|
|||
Bsprintf(apptitle, "Mapster32 %s %s", VERSION, s_buildRev);
|
||||
autosavetimer = totalclock+120*autosave;
|
||||
|
||||
// This must run before the following OSD_Exec() as the cfg may
|
||||
// e.g. contain a vid_gamma setting, resulting in a crash in
|
||||
// setbrightness() which expects basepaltableptr to be initialized.
|
||||
setbasepaltable(basepaltable, BASEPALCOUNT);
|
||||
|
||||
registerosdcommands();
|
||||
|
||||
{
|
||||
|
@ -9842,8 +9847,6 @@ int32_t ExtPostStartupWindow(void)
|
|||
return -1;
|
||||
}
|
||||
|
||||
setbasepaltable(basepaltable, BASEPALCOUNT);
|
||||
|
||||
if (ReadPaletteTable())
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue