Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-25965

HaloBorder.as does not do appropraite null checks when rendering control bar borders

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 4.1 (Release)
    • None
    • Skinning
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 3.x
      Language Found: English

    Description

      HaloBorder.as does not check that parent is null before trying to access its parent property. This means if you have a dialog that has been removed using PopupManager but it still has an event listener on a button that is preventing it from being garbage collected then the player will crash with:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.

      The issue could be resolved by replacing the code:

      // cornerRadius is defined on our parent container. Reach up
      // and grab it. Yes, this is cheating...
      if (parent && parent.parent && parent.parent is IStyleClient)

      { radius = IStyleClient(parent.parent).getStyle("cornerRadius"); borderAlpha = IStyleClient(parent.parent).getStyle("borderAlpha"); }

      // If our parent has square bottom corners,
      // use square corners.
      if (IStyleClient(parent.parent).
      getStyle("roundedBottomCorners").toString().toLowerCase() != "true")

      { radius = 0; }

      with:

      // cornerRadius is defined on our parent container. Reach up
      // and grab it. Yes, this is cheating...
      if (parent && parent.parent && parent.parent is IStyleClient)
      {
      radius =
      IStyleClient(parent.parent).getStyle("cornerRadius");
      borderAlpha =
      IStyleClient(parent.parent).getStyle("borderAlpha");

      // If our parent has square bottom corners,
      // use square corners.
      if (IStyleClient(parent.parent).
      getStyle("roundedBottomCorners").toString().toLowerCase() != "true")

      { radius = 0; }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: