fix possible double connect of the Collider m_debugDisplayDataChangedEvent (#1518)

This commit is contained in:
amzn-sean
2021-06-23 19:04:45 +01:00
committed by GitHub
parent 70042fcdcd
commit a160ffb9a3
+2 -4
View File
@@ -195,10 +195,8 @@ namespace PhysX
void Collider::Disconnect()
{
if (AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusIsConnected())
{
AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect();
}
m_debugDisplayDataChangedEvent.Disconnect();
AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect();
AzToolsFramework::EntitySelectionEvents::Bus::Handler::BusDisconnect();
AzFramework::EntityDebugDisplayEventBus::Handler::BusDisconnect();
m_displayCallback = nullptr;