Changeset 18369 in webkit


Ignore:
Timestamp:
Dec 20, 2006 5:29:17 PM (17 years ago)
Author:
harrison
Message:

Reviewed by John Sullivan.

<rdar://problem/4893376> REGRESSION: Crash occurs at WebCoreFrameBridge fontForSelection: when drag selecting from a line break


No layout test added because crash only happens in path where editing window is key,
which is never the case for the automated tests.

  • page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge fontForSelection:]): Add nil check of fontForSelection() result.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r18366 r18369  
     12006-12-20  David Harrison  <harrison@apple.com>
     2
     3        Reviewed by John Sullivan.
     4
     5        <rdar://problem/4893376> REGRESSION: Crash occurs at WebCoreFrameBridge fontForSelection: when drag selecting from a line break
     6       
     7        No layout test added because crash only happens in path where editing window is key,
     8        which is never the case for the automated tests.
     9
     10        * page/mac/WebCoreFrameBridge.mm:
     11        (-[WebCoreFrameBridge fontForSelection:]):
     12        Add nil check of fontForSelection() result.
     13
    1142006-12-21  Nikolas Zimmermann  <zimmermann@kde.org>
    215
  • trunk/WebCore/page/mac/WebCoreFrameBridge.mm

    r18245 r18369  
    14251425    bool multipleFonts = false;
    14261426    NSFont *font = nil;
    1427     if (m_frame)
    1428         font = m_frame->editor()->fontForSelection(multipleFonts)->getNSFont();
     1427    if (m_frame) {
     1428        const FontData* fd = m_frame->editor()->fontForSelection(multipleFonts);
     1429        if (fd)
     1430            font = fd->getNSFont();
     1431    }
     1432   
    14291433    if (hasMultipleFonts)
    14301434        *hasMultipleFonts = multipleFonts;
Note: See TracChangeset for help on using the changeset viewer.