This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -72,19 +72,31 @@ public override void OnEnable()
72
72
public override void OnDisable ( )
73
73
{
74
74
base . OnDisable ( ) ;
75
- ActiveView . OnDisable ( ) ;
75
+
76
+ if ( ActiveView != null )
77
+ {
78
+ ActiveView . OnDisable ( ) ;
79
+ }
76
80
}
77
81
78
82
public override void OnUI ( )
79
83
{
80
84
base . OnUI ( ) ;
81
- ActiveView . OnGUI ( ) ;
85
+
86
+ if ( ActiveView != null )
87
+ {
88
+ ActiveView . OnGUI ( ) ;
89
+ }
82
90
}
83
91
84
92
public override void Refresh ( )
85
93
{
86
94
base . Refresh ( ) ;
87
- ActiveView . Refresh ( ) ;
95
+
96
+ if ( ActiveView != null )
97
+ {
98
+ ActiveView . Refresh ( ) ;
99
+ }
88
100
}
89
101
90
102
public override void OnSelectionChange ( )
@@ -118,10 +130,15 @@ private PopupViewType ActiveViewType
118
130
get { return activeViewType ; }
119
131
set
120
132
{
133
+ var valueChanged = false ;
121
134
if ( activeViewType != value )
122
135
{
136
+ valueChanged = true ;
123
137
activeViewType = value ;
138
+ }
124
139
140
+ if ( activeView == null || valueChanged )
141
+ {
125
142
switch ( activeViewType )
126
143
{
127
144
case PopupViewType . PublishView :
You can’t perform that action at this time.
0 commit comments