diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 7339edd8b53b..69d9d3adee3d 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -230,10 +230,14 @@ gfxWindowsPlatform::gfxWindowsPlatform() ::GetVersionExA(&versionInfo); bool isVistaOrHigher = versionInfo.dwMajorVersion >= 6; + PRBool safeMode = PR_FALSE; + nsCOMPtr xr = do_GetService("@mozilla.org/xre/runtime;1"); + if (xr) + xr->GetInSafeMode(&safeMode); + #ifdef CAIRO_HAS_D2D_SURFACE PRBool d2dDisabled = PR_FALSE; PRBool d2dBlocked = PR_FALSE; - PRBool safeMode = PR_FALSE; nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); if (gfxInfo) { @@ -258,10 +262,6 @@ gfxWindowsPlatform::gfxWindowsPlatform() if (NS_FAILED(rv)) d2dDisabled = PR_FALSE; - nsCOMPtr xr = do_GetService("@mozilla.org/xre/runtime;1"); - if (xr) - xr->GetInSafeMode(&safeMode); - if (isVistaOrHigher && !d2dDisabled && !d2dBlocked && !safeMode) { // We need a DWriteFactory to work. HMODULE d3d10module = LoadLibraryA("d3d10_1.dll");