From 17b8a11acf4ec667590d57e36ec92b92be03e53a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 20 Jun 2014 12:39:33 +1000 Subject: Protect against calling Cairo function on versions of Cairo before it existed. --- gtk/PlatGTK.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index cd57607bc..88edfdec5 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -527,6 +527,7 @@ void SurfaceImpl::Release() { } bool SurfaceImpl::Initialised() { +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0) if (inited && context) { if (cairo_status(context) == CAIRO_STATUS_SUCCESS) { // Even when status is success, the target surface may have been @@ -543,6 +544,7 @@ bool SurfaceImpl::Initialised() { } return cairo_status(context) == CAIRO_STATUS_SUCCESS; } +#endif return inited; } -- cgit v1.2.3