1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-28 03:52:23 -05:00

Added little safety check. Seems to fix bug#272, can someone confirm this?

This commit is contained in:
Niels 2010-10-04 17:06:22 +02:00
parent bc243c0dc8
commit 931084900e

View File

@ -278,9 +278,9 @@ uses
{Some General PS Functions here} {Some General PS Functions here}
procedure psWriteln(str : string); extdecl; procedure psWriteln(str : string); extdecl;
begin begin
if CurrThread.Prop.WriteTimeStamp then if Assigned(CurrThread) and CurrThread.Prop.WriteTimeStamp then
str := format('[%s]: %s', [TimeToStr(TimeStampToDateTime(MSecsToTimeStamp(GetTickCount - CurrThread.StartTime))), str]); str := format('[%s]: %s', [TimeToStr(TimeStampToDateTime(MSecsToTimeStamp(GetTickCount - CurrThread.StartTime))), str]);
if Assigned(CurrThread.DebugTo) then if Assigned(CurrThread) and Assigned(CurrThread.DebugTo) then
CurrThread.DebugTo(str) CurrThread.DebugTo(str)
else else
mDebugLn(str); mDebugLn(str);