version upgrader in a presumed working story

Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
chcurran
2021-12-01 22:18:32 -08:00
parent 8c308fc3da
commit ca771f3adc
8 changed files with 38 additions and 24 deletions
@@ -438,10 +438,11 @@ namespace ScriptCanvasEditor
if (nodeConfig.IsValid())
{
ScriptCanvas::NodeUpdateSlotReport nodeUpdateSlotReport;
auto nodeEntity = node->GetEntityId();
auto nodeOutcome = graph->ReplaceNodeByConfig(node, nodeConfig, nodeUpdateSlotReport);
if (nodeOutcome.IsSuccess())
{
ScriptCanvas::MergeUpdateSlotReport(node->GetEntityId(), sm->m_updateReport, nodeUpdateSlotReport);
ScriptCanvas::MergeUpdateSlotReport(nodeEntity, sm->m_updateReport, nodeUpdateSlotReport);
sm->m_allNodes.erase(node);
sm->m_outOfDateNodes.erase(node);
@@ -687,7 +688,8 @@ namespace ScriptCanvasEditor
void EditorGraphUpgradeMachine::OnComplete(IState::ExitStatus exitStatus)
{
UpgradeNotificationsBus::Broadcast(&UpgradeNotifications::OnGraphUpgradeComplete, m_asset, exitStatus == IState::ExitStatus::Skipped);
m_asset = {};
// releasing the asset at this stage of the system tick causes a memory crash
// m_asset = {};
}
//////////////////////////////////////////////////////////////////////