Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from MarkusRannare/bug_fix_startup_crash
Browse files Browse the repository at this point in the history
Fixed crash during startup due mod.io button been removed before
  • Loading branch information
MarkusRannare authored Oct 16, 2020
2 parents 6c8f7a7 + cb1779d commit 46d7aa1
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions Source/modioEditor/Private/modioEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 46d7aa1

Please sign in to comment.