6660c365b9
In some cases, the interface being queried may be persistently nullptr (e.g. a gem isn't active, or a feature was disabled by a cvar). In this case, querying the interface would always enter the writer-lock branch with existing code because nullptr was synonmous with "we haven't queried for this variable yet." This PR adds an additional state variable that is set when s_instance is assigned to, so that after the variable is queried and found to be null, future queries can enter the read-lock branch. Signed-off-by: Jeremy Ong <jcong@amazon.com>