MacOS fixes

This fixes an issue where Con::getVariable can't be used in the global scope before the console system is initialized. I'm honestly surprised this error didn't happen on any other platform.
This commit is contained in:
Jeff Hutchinson 2021-08-21 20:48:26 -04:00
parent c04f3ae166
commit 37dc8626f5
3 changed files with 9 additions and 3 deletions

View file

@ -50,7 +50,7 @@
#include "ts/tsLastDetail.h"
#endif
StringTableEntry ShapeAsset::smNoShapeAssetFallback(StringTable->insert(Con::getVariable("$Core::NoShapeAssetFallback")));
StringTableEntry ShapeAsset::smNoShapeAssetFallback = NULL;
//-----------------------------------------------------------------------------
@ -146,6 +146,8 @@ void ShapeAsset::consoleInit()
Con::addVariable("$Core::NoShapeAssetFallback", TypeString, &smNoShapeAssetFallback,
"The assetId of the shape to display when the requested shape asset is missing.\n"
"@ingroup GFX\n");
smNoShapeAssetFallback = StringTable->insert(Con::getVariable("$Core::NoShapeAssetFallback"));
}
//-----------------------------------------------------------------------------