From: Andreas H. <ah...@us...> - 2005-11-22 10:48:58
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32172/run Modified Files: JvCheckBox.pas JvLinkedControls.pas JvRadioButton.pas Log Message: Fixed Mantis #3200: Using LinkedControls in combination with FastMM4 results in AV because of attempt to call a virtual method on a freed object Index: JvLinkedControls.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvLinkedControls.pas,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** JvLinkedControls.pas 5 May 2005 20:11:30 -0000 1.19 --- JvLinkedControls.pas 22 Nov 2005 10:48:43 -0000 1.20 *************** *** 253,267 **** I: Integer; begin ! // make sure the owning control isn't being destroyed ! if Assigned(FControl) and (csDestroying in FControl.ComponentState) then ! Exit; ! BeginUpdate; ! try ! if (AComponent is TControl) and (Operation = opRemove) then for I := 0 to Count - 1 do if Items[I].Control = AComponent then Items[I].Control := nil; ! finally ! EndUpdate; end; end; --- 253,266 ---- I: Integer; begin ! if (Operation = opRemove) and (AComponent is TControl) then ! begin ! BeginUpdate; ! try for I := 0 to Count - 1 do if Items[I].Control = AComponent then Items[I].Control := nil; ! finally ! EndUpdate; ! end; end; end; Index: JvRadioButton.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvRadioButton.pas,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** JvRadioButton.pas 17 Feb 2005 10:20:46 -0000 1.41 --- JvRadioButton.pas 22 Nov 2005 10:48:43 -0000 1.42 *************** *** 390,394 **** begin inherited Notification(AComponent, Operation); ! if Assigned(FLinkedControls) and not (csDestroying in ComponentState) then LinkedControls.Notification(AComponent, Operation); end; --- 390,394 ---- begin inherited Notification(AComponent, Operation); ! if Assigned(FLinkedControls) then LinkedControls.Notification(AComponent, Operation); end; Index: JvCheckBox.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvCheckBox.pas,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** JvCheckBox.pas 5 May 2005 20:10:49 -0000 1.58 --- JvCheckBox.pas 22 Nov 2005 10:48:43 -0000 1.59 *************** *** 451,455 **** begin inherited Notification(AComponent, Operation); ! if Assigned(FLinkedControls) and not (csDestroying in ComponentState) then LinkedControls.Notification(AComponent, Operation); end; --- 451,455 ---- begin inherited Notification(AComponent, Operation); ! if Assigned(FLinkedControls) then LinkedControls.Notification(AComponent, Operation); end; |