Skip to content

Commit 6da04e1

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.5] Missing null check when destroying runtime debug UI by exiting play mode
1 parent 0cba8f0 commit 6da04e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Packages/com.unity.render-pipelines.core/Runtime/Debugging/RuntimeDebugWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void OnDestroy()
139139

140140
// Need to unregister here as well because when the UI is closed and reopened, it is a different object so the member
141141
// function will be a different object and the Unregister call in RecreateGUI does nothing.
142-
m_PanelRootElement.UnregisterCallback<NavigationMoveEvent>(ConvertNavigationMoveEvents, TrickleDown.TrickleDown);
142+
m_PanelRootElement?.UnregisterCallback<NavigationMoveEvent>(ConvertNavigationMoveEvents, TrickleDown.TrickleDown);
143143
}
144144

145145
DebugManager.instance.displayRuntimeUI = false;

0 commit comments

Comments
 (0)