diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-11-07 14:10:23 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-11-07 14:10:23 +0200 |
commit | 9f333fb56ddaa3cf0c30d00057f929aaa69b82ae (patch) | |
tree | c4adca6bf4f9fce5fc744c880f67794089a12e7a /src/corelib | |
parent | 9d392013df1a1862bfeceb28e50cbc3ce0c765da (diff) | |
download | fpGUI-9f333fb56ddaa3cf0c30d00057f929aaa69b82ae.tar.xz |
Timer related functions now check to see if global fpgTimers exists or not.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_main.pas | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index e1acf0eb..395aad5c 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -542,6 +542,8 @@ var i: integer; ctime: TDateTime; begin + if fpgTimers = nil then + Exit; ctime := now; i := fpgTimers.Count; Result := i > 0; @@ -559,6 +561,8 @@ procedure fpgResetAllTimers; var i: integer; begin + if fpgTimers = nil then + Exit; for i := 0 to fpgTimers.Count-1 do TfpgTimer(fpgTimers[i]).Reset; end; @@ -570,6 +574,8 @@ var dt: TDateTime; tb: Boolean; begin + if fpgTimers = nil then + Exit; // returns -1 if no timers are pending dt := ctime + amaxtime * ONE_MILISEC; tb := False; @@ -867,7 +873,7 @@ begin // Dump_Stack(StdOut, get_frame); Writeln(stdout,'An unhandled exception occurred at $',HexStr(Ptrint(ExceptAddr),sizeof(PtrInt)*2),' :'); - if ExceptObject is exception then + if ExceptObject is Exception then begin lMessage := Exception(ExceptObject).ClassName+' : '+Exception(ExceptObject).Message; Writeln(stdout,lMessage); |