diff --git a/com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs b/com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs index 9bc66f8a..45a43df2 100644 --- a/com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs +++ b/com.unity.uiwidgets/Editor/UIWidgetsEditorPanel.cs @@ -121,6 +121,10 @@ namespace Unity.UIWidgets.Editor { return; } + if (_wrapper.renderTexture == null) { + return; + } + EditorGUI.DrawPreviewTexture(new Rect(0.0f, 0.0f, width: position.width, height: position.height), image: _wrapper.renderTexture, mat: _uiMaterial); Input_OnGUIEvent(evt: Event.current);