diff options
author | David Tardon <dtardon@redhat.com> | 2012-01-31 10:52:10 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-02-01 06:07:21 +0100 |
commit | 4f6a5040db04a59498d2ef2b729659a94140c23b (patch) | |
tree | 782afb76aa31aee4d14bd0c199535db0755052f8 /canvas | |
parent | 767098b0ca717b6649223940af907593723bc927 (diff) |
the depth argument must be >= 0
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_xlib_cairo.cxx | 3 |
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 ) )); } /** |