Fix ExternalPumpBrowser, Stop Scheduler.

This commit is contained in:
martin
2021-02-18 00:12:37 +01:00
parent c6884ecdf8
commit ed42096f1e
2 changed files with 10 additions and 2 deletions
@@ -42,14 +42,19 @@ unit InitSubProcess;
interface
uses
GlobalCefApplication, uCEFApplication;
GlobalCefApplication, uCEFApplication, uCEFWorkScheduler;
implementation
initialization
CreateGlobalCEFApp;
if not GlobalCEFApp.StartMainProcess then
if not GlobalCEFApp.StartMainProcess then begin
if GlobalCEFWorkScheduler <> nil then
GlobalCEFWorkScheduler.StopScheduler;
DestroyGlobalCEFApp;
DestroyGlobalCEFWorkScheduler;
halt(0); // exit the subprocess
end;
end.
@@ -284,7 +284,10 @@ initialization
finalization
(* Destroy from this unit, which is used after "Interfaces". So this happens before the Application object is destroyed *)
if GlobalCEFWorkScheduler <> nil then
GlobalCEFWorkScheduler.StopScheduler;
DestroyGlobalCEFApp;
DestroyGlobalCEFWorkScheduler;
end.