darekM wrote:
Micha Nelissen napisaĆ(a):
On Sun, 13 Nov 2005 17:37:18 +0100
darekm <[EMAIL PROTECTED]> wrote:
Index: lcl/include/wincontrol.inc
===================================================================
--- lcl/include/wincontrol.inc (wersja 8136)
+++ lcl/include/wincontrol.inc (kopia robocza)
@@ -3993,7 +3993,7 @@
begin
if not HandleAllocated then
//Assert(False, Format('Trace:[TWinControl.GetHandle] %s(%s)',
[ClassNAme, Name]))
- ;
+
HandleNeeded;
Result := FHandle;
end;
That's obscure IMHO: it moves the HandleNeeded under the if.
Now HandleNeeded is invoked even if handle is allocated, what for
I think, it should be done only when condition will be true
Now is:
if not HandleAllocated then ;
HandleNeeded;
The if was meant for the assert and not the handle needed.
It doesn't make much sense to check twice. (and that why you just call
HandleNeeded)
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives