Passing ArmaReforgerScripted::PlayGameConfig() an invalid resource name will crash the game.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 7
- Category
- General
Additional Information
This will not cause any issues in vanilla since this transition is never officially used.
While PlayGameConfig does check if an empty resource was passed, it does not check if the resource is actually a scenario config or even exists at all.
Adding a simple resource validity check would make the method safer to use for modders out of the box:
Resource r = Resource.Load(sResource); if (!r || !r.IsValid()) return;
Optionally, another check could verify the resource is actually of class MissionHeader, e. g. using SCR_ConfigHelper.