From cb1779d23a06d191d4f6f2602a136b3b5daefaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20R=C3=A4nnare?= Date: Fri, 16 Oct 2020 13:27:19 +0200 Subject: [PATCH] Fixed crash during startup due mod.io button been removed before --- Source/modioEditor/Private/modioEditor.cpp | 52 ++++++++++++---------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/Source/modioEditor/Private/modioEditor.cpp b/Source/modioEditor/Private/modioEditor.cpp index 63b625e..7fcd05b 100644 --- a/Source/modioEditor/Private/modioEditor.cpp +++ b/Source/modioEditor/Private/modioEditor.cpp @@ -71,30 +71,34 @@ static bool Disabled() { return false; } void FmodioEditorModule::MapCommands() { - PluginCommands->MapAction( - FmodioEditorCommands::Get().Login, - FExecuteAction::CreateRaw(this, &FmodioEditorModule::PluginButtonClicked), - FCanExecuteAction::CreateStatic( &FmodioEditorModule::Enabled_LoginButton ) ); - - PluginCommands->MapAction( - FmodioEditorCommands::Get().Logout, - FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), - FCanExecuteAction::CreateStatic( &FmodioEditorModule::Enabled_LogoutButton ) ); - - PluginCommands->MapAction( - FmodioEditorCommands::Get().UploadMod, - FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), - FCanExecuteAction::CreateStatic( &Disabled ) ); - - PluginCommands->MapAction( - FmodioEditorCommands::Get().NewModWizard, - FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), - FCanExecuteAction::CreateStatic( &Disabled ) ); - - PluginCommands->MapAction( - FmodioEditorCommands::Get().Settings, - FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), - FCanExecuteAction::CreateStatic( &Disabled ) ); + // We have disabled all the plugin commands as the button isn't there anymore + if(0) + { + PluginCommands->MapAction( + FmodioEditorCommands::Get().Login, + FExecuteAction::CreateRaw(this, &FmodioEditorModule::PluginButtonClicked), + FCanExecuteAction::CreateStatic( &FmodioEditorModule::Enabled_LoginButton ) ); + + PluginCommands->MapAction( + FmodioEditorCommands::Get().Logout, + FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), + FCanExecuteAction::CreateStatic( &FmodioEditorModule::Enabled_LogoutButton ) ); + + PluginCommands->MapAction( + FmodioEditorCommands::Get().UploadMod, + FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), + FCanExecuteAction::CreateStatic( &Disabled ) ); + + PluginCommands->MapAction( + FmodioEditorCommands::Get().NewModWizard, + FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), + FCanExecuteAction::CreateStatic( &Disabled ) ); + + PluginCommands->MapAction( + FmodioEditorCommands::Get().Settings, + FExecuteAction::CreateRaw( this, &FmodioEditorModule::PluginButtonClicked ), + FCanExecuteAction::CreateStatic( &Disabled ) ); + } } void FmodioEditorModule::PluginButtonClicked()