⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 142639 in webkit


Ignore:
Timestamp:
Feb 12, 2013, 10:34:43 AM (14 years ago)
Author:
eric.carlson@apple.com
Message:

[Mac] guard against NULL languages array
https://bugs.webkit.org/show_bug.cgi?id=109595

Reviewed by Dean Jackson.

No new tests, existing tests won't crash if this is correct.

  • page/CaptionUserPreferencesMac.mm:

(WebCore::CaptionUserPreferencesMac::preferredLanguages):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142638 r142639  
     12013-02-12  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] guard against NULL languages array
     4        https://bugs.webkit.org/show_bug.cgi?id=109595
     5
     6        Reviewed by Dean Jackson.
     7
     8        No new tests, existing tests won't crash if this is correct.
     9
     10        * page/CaptionUserPreferencesMac.mm:
     11        (WebCore::CaptionUserPreferencesMac::preferredLanguages):
     12
    1132013-02-12  Emil A Eklund  <eae@chromium.org>
    214
  • trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm

    r142580 r142639  
    474474    }
    475475
     476    CFIndex languageCount = 0;
    476477    RetainPtr<CFArrayRef> languages(AdoptCF, MACaptionAppearanceCopySelectedLanguages(kMACaptionAppearanceDomainUser));
    477     CFIndex languageCount = CFArrayGetCount(languages.get());
     478    if (languages)
     479        languageCount = CFArrayGetCount(languages.get());
    478480
    479481    if (!languageCount)
Note: See TracChangeset for help on using the changeset viewer.