Skip to content

Commit 3dff7e6

Browse files
author
je
committed
fix: Instance caused a stack overflow
1 parent fd9ffcc commit 3dff7e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/Scripts/Runtime/Singleton.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ public static T Instance
4444
{
4545
get
4646
{
47-
if (Instance == null)
47+
if (instance == null)
4848
{
4949
//ensure that only one thread can execute
5050
lock (typeof(T))
5151
{
52-
if (Instance == null)
52+
if (instance == null)
5353
{
5454
instance = new T();
5555
instance.InitializeSingleton();

0 commit comments

Comments
 (0)