mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Bug 1357307 - Make sure gfxPrefs instance is created before accessing it. r=milan
This commit is contained in:
parent
fd0681d297
commit
31140c21b1
@ -19,6 +19,7 @@
|
||||
#include "mozilla/widget/WidgetMessageUtils.h"
|
||||
|
||||
#include "gfxPlatform.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "qcms.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -820,6 +821,8 @@ nsXPLookAndFeel::GetColorImpl(ColorID aID, bool aUseStandinsForNativeColors,
|
||||
}
|
||||
|
||||
if (sUseNativeColors && NS_SUCCEEDED(NativeGetColor(aID, aResult))) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
gfxPrefs::GetSingleton();
|
||||
if ((gfxPlatform::GetCMSMode() == eCMSMode_All) &&
|
||||
!IsSpecialColor(aID, aResult)) {
|
||||
qcms_transform *transform = gfxPlatform::GetCMSInverseRGBTransform();
|
||||
|
Loading…
Reference in New Issue
Block a user