From e7f04f1fad66f95a8b316838daff340f1c496642 Mon Sep 17 00:00:00 2001 From: "pavlov%pavlov.net" Date: Wed, 1 Mar 2006 18:27:38 +0000 Subject: [PATCH] fixing linux fallout from 328906. patch from Simon Montague . r=pavlov --- gfx/thebes/public/gfxPangoFonts.h | 5 +++++ gfx/thebes/src/gfxPangoFonts.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gfx/thebes/public/gfxPangoFonts.h b/gfx/thebes/public/gfxPangoFonts.h index 04719828d7ec..2d1409e4064e 100644 --- a/gfx/thebes/public/gfxPangoFonts.h +++ b/gfx/thebes/public/gfxPangoFonts.h @@ -79,6 +79,11 @@ public: virtual gfxTextRun *MakeTextRun(const nsAString& aString); + gfxPangoFont *GetFontAt(PRInt32 i) { + return NS_STATIC_CAST(gfxPangoFont*, + NS_STATIC_CAST(gfxFont*, mFonts[i])); + } + protected: static PRBool FontCallback (const nsAString& fontName, const nsAString& genericName, diff --git a/gfx/thebes/src/gfxPangoFonts.cpp b/gfx/thebes/src/gfxPangoFonts.cpp index 710a71cf5668..f2c11e90a4be 100644 --- a/gfx/thebes/src/gfxPangoFonts.cpp +++ b/gfx/thebes/src/gfxPangoFonts.cpp @@ -623,7 +623,7 @@ gfxPangoTextRun::~gfxPangoTextRun() void gfxPangoTextRun::EnsurePangoLayout(gfxContext *aContext) { - gfxPangoFont *pf = ((gfxPangoFont*) mGroup->GetFontList()[0]); + nsRefPtr pf = mGroup->GetFontAt(0); if (mPangoLayout == nsnull) { NS_ConvertUTF16toUTF8 u8str(mString);