File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Packages/com.unity.render-pipelines.core/Editor/SampleDependencyImportSystem Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ VisualElement panelRoot
4848 {
4949 get
5050 {
51- _panelRoot ??= injectingElement . panel . visualTree ;
51+ _panelRoot ??= injectingElement ? . panel ? . visualTree ;
5252 return _panelRoot ;
5353 }
5454 }
@@ -82,11 +82,11 @@ VisualElement IPackageManagerExtension.CreateExtensionUI()
8282
8383 void RefreshSampleButtons ( )
8484 {
85- if ( injectingElement == null || m_PackageInfo == null || m_SampleList == null )
85+ if ( injectingElement == null || m_PackageInfo == null || m_SampleList == null || panelRoot == null )
8686 return ;
8787
8888 // Call refresh of samples and button injection when switching to the "Samples" tab.
89- if ( samplesButton == null )
89+ if ( samplesButton == null )
9090 {
9191 samplesButton = panelRoot . Q < Button > ( name : samplesButtonName ) ;
9292 if ( samplesButton != null )
You can’t perform that action at this time.
0 commit comments