Calling this code here from a ScriptClass within the Workbench will cause it to crash AFTER reloading (first load works fine)
Description
Description
Details
Details
- Severity
- Block
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
Steps To Reproduce
- Create Script file with the following code within the constructor:
Note: Any layout file will work, I just chose this one for example
GetGame().GetWorkspace().CreateWidgets("gui/layouts/dialog.layout");
- Call Script file from ANY ScriptClass on a layout file
- Reload layout data (this can be done by just changing a paramenter in a Widget - example Toggle Visibility)
- Crash workbench! Because GetGame().GetWorkspace() returned null :)
Additional Information
I've included the two files I used to reproduce this bug. Below is my result, notice workspace = NULL