diff options
Diffstat (limited to 'src/corelib/gfxbase.pas')
-rw-r--r-- | src/corelib/gfxbase.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas index 03aae37d..6e419d72 100644 --- a/src/corelib/gfxbase.pas +++ b/src/corelib/gfxbase.pas @@ -1938,7 +1938,13 @@ begin end; procedure TfpgApplicationBase.Terminate; +var + i: integer; begin + // make sure all forms are closed before main form + for i := FormCount - 1 downto 0 do + if Forms[i] <> MainForm then + fpgSendMessage(Self, Forms[i], FPGM_CLOSE); // SendMessage waits for it to complete. Post doesn't. Terminated := True; end; |