[fpc-devel] Possible bug in "chmreader"
Michael Van Canneyt
michael at freepascal.org
Thu Feb 22 09:21:07 CET 2024
On Wed, 21 Feb 2024, Christo Crause via fpc-devel wrote:
> Hi Kit,
>
> fwindowslist is created in the constructor, which may explain why this bug
> is dormant.
> I assume this is supposed to be a defensive check, although fwindowslist is
> also accessed
> later in this method without a safety check. Perhaps the "if not?
> assigned()" check can be omitted
> since it isn't sufficient protection and the constructor should have
> automatically created the fwindowslist class.
I checked the code.
I removed the check, the check is pointless as you correctly pointed out.
There is more scary code in these units, a general overhaul would not go amiss.
Michael.
More information about the fpc-devel
mailing list