diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp index 847dd6d0305..7abe033a2ce 100644 --- a/gfx/thebes/gfxASurface.cpp +++ b/gfx/thebes/gfxASurface.cpp @@ -65,7 +65,7 @@ #include "gfxDirectFBSurface.h" #endif -#ifdef CAIRO_HAS_QT_SURFACE +#if defined(CAIRO_HAS_QT_SURFACE) && defined(MOZ_WIDGET_QT) #include "gfxQPainterSurface.h" #endif @@ -191,7 +191,7 @@ gfxASurface::Wrap (cairo_surface_t *csurf) result = new gfxDirectFBSurface(csurf); } #endif -#ifdef CAIRO_HAS_QT_SURFACE +#if defined(CAIRO_HAS_QT_SURFACE) && defined(MOZ_WIDGET_QT) else if (stype == CAIRO_SURFACE_TYPE_QT) { result = new gfxQPainterSurface(csurf); }