Bug 667663 - Silence MSVC warning by returning NULL if DWrite is disabled. r=bas
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 30 Jun 2011 14:35:46 +0200
changeset 72153 93ad15ba19d52d6fa2e811e515b76e76f3a60e97
parent 72152 d8f6acb5842203e1f6050c1fcd8474ccbc705366
child 72154 72b3e516157840c1ed869404d6f3efa10f1e4701
push id20667
push usermak77@bonardo.net
push dateSat, 02 Jul 2011 08:40:37 +0000
treeherdermozilla-central@cff486d4d6a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs667663
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 667663 - Silence MSVC warning by returning NULL if DWrite is disabled. r=bas
gfx/thebes/gfxWindowsPlatform.cpp
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -450,16 +450,18 @@ gfxWindowsPlatform::GetScaledFontForFont
     NativeFont nativeFont;
     nativeFont.mType = NATIVE_FONT_DWRITE_FONT_FACE;
     nativeFont.mFont = font->GetFontFace();
     RefPtr<ScaledFont> scaledFont =
       mozilla::gfx::Factory::CreateScaledFontForNativeFont(nativeFont, font->GetAdjustedSize());
 
     return scaledFont;
   }
+
+  return NULL;
 }
 
 already_AddRefed<gfxASurface>
 gfxWindowsPlatform::GetThebesSurfaceForDrawTarget(DrawTarget *aTarget)
 {
 #ifdef XP_WIN
   if (aTarget->GetType() == BACKEND_DIRECT2D) {
     RefPtr<ID3D10Texture2D> texture =