summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--canvas/source/cairo/cairo_xlib_cairo.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx
index e084eda079c5..df14fcecb24c 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.cxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include <utility>
#include <tools/prex.h>
#include <X11/extensions/Xrender.h>
@@ -267,7 +268,7 @@ namespace cairo
aSystemGraphicsData.pXRenderFormat = getRenderFormat();
return boost::shared_ptr<VirtualDevice>(
- new VirtualDevice( &aSystemGraphicsData, getDepth() ));
+ new VirtualDevice( &aSystemGraphicsData, std::max( getDepth(), 0 ) ));
}
/**