Crash in 5.6 preview - deprecated delegate wrappers in GraphEditor.cpp access variable after free

Steps to Reproduce

  1. Create an SGraphEditor::FGraphEditorEvents on the stack
  2. Bind a callback to the deprecated “OnCreateActionMenu” delegate.
  3. Create a new SGraphEditor, passing in the temporary FGraphEditorEvents which goes out of scope after the caller finishes.
  4. Caller scope exits, FGraphEditorEvents variable is expired
  5. <some time passes>
  6. Right click in the new graph editor, it will invoke the OnCreateActionMenuAtLocation wrapper we created in SGraphEditor::UpgradeDeprecatedDelegates.
  7. It will crash when trying to invoke EventsToUpdate.OnCreateActionMenu as EventsToUpdate is an expired stack object which was destructed in step 3.