This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed
Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ static JsonReader()
5050
5151 public static void Refresh ( )
5252 {
53+ if ( JsonReader . Instance == null )
54+ return ;
55+
5356 ReadFn = JsonReader . Instance . GetParseFn < T > ( ) ;
5457 }
5558
Original file line number Diff line number Diff line change @@ -154,7 +154,10 @@ public static void Reset()
154154
155155 public static void Refresh ( )
156156 {
157- CacheFn = typeof ( T ) == typeof ( object )
157+ if ( JsonWriter . Instance == null )
158+ return ;
159+
160+ CacheFn = typeof ( T ) == typeof ( object )
158161 ? JsonWriter . WriteLateBoundObject
159162 : JsonWriter . Instance . GetWriteFn < T > ( ) ;
160163 }
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ static JsvReader()
5050
5151 public static void Refresh ( )
5252 {
53+ if ( JsvReader . Instance == null )
54+ return ;
55+
5356 ReadFn = JsvReader . Instance . GetParseFn < T > ( ) ;
5457 }
5558
Original file line number Diff line number Diff line change @@ -112,7 +112,10 @@ public static void Reset()
112112
113113 public static void Refresh ( )
114114 {
115- CacheFn = typeof ( T ) == typeof ( object )
115+ if ( JsvWriter . Instance == null )
116+ return ;
117+
118+ CacheFn = typeof ( T ) == typeof ( object )
116119 ? JsvWriter . WriteLateBoundObject
117120 : JsvWriter . Instance . GetWriteFn < T > ( ) ;
118121 }
You can’t perform that action at this time.
0 commit comments