From ea691408dc069d1ef15e7f176bb6f4d2770412a7 Mon Sep 17 00:00:00 2001 From: pierre Date: Tue, 2 Oct 2001 16:31:20 +0000 Subject: [PATCH] * avoid crashes in topic text compares --- ide/whelp.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ide/whelp.pas b/ide/whelp.pas index 856051541a..2a0085ae2d 100644 --- a/ide/whelp.pas +++ b/ide/whelp.pas @@ -556,7 +556,10 @@ begin { Try to read the title of the topic } T1:=HelpFacility^.LoadTopic(K1^.FileID,K1^.HelpCtx); T2:=HelpFacility^.LoadTopic(K2^.FileID,K2^.HelpCtx); - r:=strcomp(pchar(T1^.Text),pchar(T2^.Text)); + if assigned(T1^.Text) and assigned(T2^.Text) then + r:=strcomp(pchar(T1^.Text),pchar(T2^.Text)) + else + r:=0; if r>0 then begin Compare:=1; @@ -900,7 +903,10 @@ end; END. { $Log$ - Revision 1.3 2001-10-01 00:24:09 pierre + Revision 1.4 2001-10-02 16:31:20 pierre + * avoid crashes in topic text compares + + Revision 1.3 2001/10/01 00:24:09 pierre * fix several help problems Revision 1.2 2001/09/18 11:33:53 pierre