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

Signed-off-by: John <jonawals@amazon.com>
This commit is contained in:
amzn-sean
2021-06-23 19:04:45 +01:00
committed by John
parent aa94effd26
commit 6db3650d45
+2 -4
View File
@@ -200,10 +200,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;