From: Peter T. <pe...@us...> - 2004-02-27 23:22:07
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3304/run Modified Files: JvHttpGrabber.pas JvUrlGrabbers.pas Log Message: - Mantis #1384 (Invalid Pointer Operation in JvHTTPGrabber when URL is empty) Index: JvUrlGrabbers.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvUrlGrabbers.pas,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** JvUrlGrabbers.pas 27 Feb 2004 22:59:15 -0000 1.10 --- JvUrlGrabbers.pas 27 Feb 2004 23:05:13 -0000 1.11 *************** *** 376,379 **** --- 376,383 ---- function JvUrlGrabberClassList: TJvUrlGrabberClassList; + resourcestring + // TODO: move to JvResources + SFileNotFoundFmt = 'File "%s" not found'; + implementation *************** *** 385,389 **** {$IFNDEF COMPILER6_UP} - function FtpGetFileSize(hFile: HINTERNET; lpdwFileSizeHigh: LPDWORD): DWORD; stdcall; external 'wininet.dll' name 'FtpGetFileSize'; --- 389,392 ---- *************** *** 1032,1038 **** { TJvLocalFileUrlGrabberThread } - resourcestring - // TODO: move to JvResources - SFileNotFoundFmt = 'File "%s" not found'; procedure TJvLocalFileUrlGrabberThread.Execute; --- 1035,1038 ---- Index: JvHttpGrabber.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvHttpGrabber.pas,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JvHttpGrabber.pas 13 Jan 2004 09:20:20 -0000 1.9 --- JvHttpGrabber.pas 27 Feb 2004 23:05:13 -0000 1.10 *************** *** 142,145 **** --- 142,148 ---- end; + resourcestring + SURLIsEmpty = 'URL is empty'; + implementation *************** *** 213,217 **** begin //Download it ! if FThread = nil then begin FThread := TJvHttpThread.Create(Url, Referer, Username, FileName, Password, --- 216,220 ---- begin //Download it ! if (FThread = nil) then begin FThread := TJvHttpThread.Create(Url, Referer, Username, FileName, Password, *************** *** 385,388 **** --- 388,398 ---- begin + if FUrl = '' then + begin + FErrorText := SURLIsEmpty; + Error; + Exit; + end; + // (rom) secure thread against exceptions Buffer := nil; |