From: <ob...@us...> - 2007-04-16 09:59:02
|
Revision: 11264 http://svn.sourceforge.net/jvcl/?rev=11264&view=rev Author: obones Date: 2007-04-16 02:59:00 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Mantis 4105: Now does not crash if MaxSimultaneousGrabbers is greater than URLs.Count Modified Paths: -------------- trunk/jvcl/run/JvUrlListGrabber.pas Modified: trunk/jvcl/run/JvUrlListGrabber.pas =================================================================== --- trunk/jvcl/run/JvUrlListGrabber.pas 2007-04-15 13:54:38 UTC (rev 11263) +++ trunk/jvcl/run/JvUrlListGrabber.pas 2007-04-16 09:59:00 UTC (rev 11264) @@ -700,10 +700,12 @@ FGrabbers.Clear; - MaxNewGrabbers := MaxSimultaneousGrabbers; - if MaxNewGrabbers = 0 then - MaxNewGrabbers := FURLs.Count; + if (MaxSimultaneousGrabbers = 0) or (FURLs.Count < MaxSimultaneousGrabbers) then + MaxNewGrabbers := FURLs.Count + else + MaxNewGrabbers := MaxSimultaneousGrabbers; + FNextUrlIndex := 0; for I := 0 to MaxNewGrabbers - 1 do StartNextGrabber; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |