Browse Source

Failure when the active session is disconnected and Custom commands toolbar is showing or the Custom commands menu is opened

Source commit: 21e807df782d2b08498f3076c0d73f9bdccad649
Martin Prikryl 6 years ago
parent
commit
17e5845083
1 changed files with 1 additions and 1 deletions
  1. 1 1
      source/forms/CustomScpExplorer.cpp

+ 1 - 1
source/forms/CustomScpExplorer.cpp

@@ -1760,7 +1760,7 @@ bool __fastcall TCustomScpExplorerForm::CustomCommandRemoteAllowed()
 {
   // remote custom commands can be executed only if the server supports shell commands
   // or have secondary shell
-  return (FTerminal != NULL) && (FTerminal->IsCapable[fcSecondaryShell] || FTerminal->IsCapable[fcShellAnyCommand]);
+  return (FTerminal != NULL) && FTerminal->Active && (FTerminal->IsCapable[fcSecondaryShell] || FTerminal->IsCapable[fcShellAnyCommand]);
 }
 //---------------------------------------------------------------------------
 int __fastcall TCustomScpExplorerForm::CustomCommandState(