Skip to content

Commit 4f941c9

Browse files
committed
Check null _tablecontrol for on events
1 parent 073e4d0 commit 4f941c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Assets/TableForge/Editor/UI/Windows/TableVisualizerWindow/TableVisualizer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ private void OnProjectChanged()
103103

104104
private void OnScriptableObjectModified(ScriptableObject scriptableObject)
105105
{
106+
if(_tableControl == null) return;
107+
106108
Row row = _tableControl.TableData.Rows.Values.FirstOrDefault(r => r.SerializedObject.RootObject == scriptableObject);
107109
if(row == null) return;
108110

@@ -111,6 +113,7 @@ private void OnScriptableObjectModified(ScriptableObject scriptableObject)
111113

112114
private void Update()
113115
{
116+
if(_tableControl == null) return;
114117
if(!TableSettings.GetSettings().enablePolling || _lastUpdateTime >= EditorApplication.timeSinceStartup - TableSettings.GetSettings().pollingInterval)
115118
return;
116119

0 commit comments

Comments
 (0)