From a717a2e41bbffdf5126e3e45a54946fde10a4272 Mon Sep 17 00:00:00 2001 From: "mats.palmgren%bredband.net" Date: Thu, 31 Jul 2008 01:46:37 +0000 Subject: [PATCH] Don't use the surface if there was an error creating it. b=441995 r+sr=roc a=ss git-svn-id: svn://10.0.0.236/trunk@253348 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/gtk2/nsWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mozilla/widget/src/gtk2/nsWindow.cpp b/mozilla/widget/src/gtk2/nsWindow.cpp index 9e0d18739f3..32d3a879e70 100644 --- a/mozilla/widget/src/gtk2/nsWindow.cpp +++ b/mozilla/widget/src/gtk2/nsWindow.cpp @@ -1722,6 +1722,9 @@ nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent) bufferPixmapSurface = new gfxXlibSurface(display, drawable, XVisual, gfxIntSize(boundsRect.width, boundsRect.height)); + if (bufferPixmapSurface && bufferPixmapSurface->CairoStatus()) { + bufferPixmapSurface = nsnull; + } if (bufferPixmapSurface) { bufferPixmapSurface->SetDeviceOffset(gfxPoint(-boundsRect.x, -boundsRect.y)); nsCOMPtr newRC;