Fixed creation of BaseStatusBar
No more access to memory ouside of class instance Minimized amount of copy-pasted code https://mantis.zdoom.org/view.php?id=511
This commit is contained in:
parent
5601364aaf
commit
f48af606df
2 changed files with 19 additions and 19 deletions
|
|
@ -1546,11 +1546,6 @@ DBaseStatusBar *CreateCustomStatusBar(int scriptno)
|
|||
I_FatalError("Tried to create a status bar with no script!");
|
||||
|
||||
auto sbar = (DBaseStatusBar*)PClass::FindClass("SBarInfoWrapper")->CreateNew();
|
||||
IFVIRTUALPTR(sbar, DBaseStatusBar, Init)
|
||||
{
|
||||
VMValue params[] = { sbar };
|
||||
GlobalVMStack.Call(func, params, 1, nullptr, 0);
|
||||
}
|
||||
auto core = new DSBarInfo(sbar, script);
|
||||
sbar->PointerVar<DSBarInfo>("core") = core;
|
||||
sbar->SetSize(script->height, script->_resW, script->_resH);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue