Skip to content

Commit

Permalink
Protect from crash when pressing ctrl+tab before main form is display…
Browse files Browse the repository at this point in the history
…ed. Closes #574
  • Loading branch information
ansgarbecker committed Mar 14, 2019
1 parent d6dc4cd commit f8acaa7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/main.pas
Expand Up @@ -5248,6 +5248,11 @@ procedure TMainForm.PageControlMainChange(Sender: TObject);
var
tab: TTabSheet;
begin
// Protect from crash when pressing ctrl+tab before main form is displayed
// See #574
if not Self.Visible then
Exit;

tab := PageControlMain.ActivePage;

// Move focus to relevant controls in order for them to receive keyboard events.
Expand Down

0 comments on commit f8acaa7

Please sign in to comment.