Assigning Text Attributes Causes AV

  • Hi Julian,

    I had a couple of calls in my app such as

    wpRichText1.HyperLinkTextAttr:=wpRichText2.HyperLinkTextAttr;

    And also for FieldObjects.

    My app was crashing on close everytime. There was an invalidpointer exception each time it was trying to free an unspecified object.

    By a painful process of elimination I isolated the above code as being responsible.

    The code compiles fine. Is there a problem in using it in this way or is this a bug?

    Thanks

    Mark

    • Offizieller Beitrag

    Sorry about that. This appears to be a bug in unit WPWinCTR where the set procedures should read like:

    Code
    procedure TWPCustomRtfEdit.SetHyperlinkTextAttr(x: TCharacterAttr);
    begin
      FMemo.FHyperlinkTextAttr.Assign(x);
    end;

    Julian