summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-10-02 05:49:53 +0000
committerAdrian Johnson <ajohnson@redneon.com>2023-10-02 05:49:53 +0000
commit95c8d5b1e025d9d1e77ee6c9d9b167edcdc7ce0d (patch)
tree6a970701805416c29afa02cb62a6262237f17f9c
parent29592a331c947737e688d095f5f8a2ee77b666f5 (diff)
parent0fce59ff8d250a59ccc86894b8f1459070bf6ddb (diff)
Merge branch 'fix-tags-incorrect-surface' into 'master'
Fix surface type mismatch error in pdf-interchange See merge request cairo/cairo!521
-rw-r--r--src/cairo-pdf-interchange.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cairo-pdf-interchange.c b/src/cairo-pdf-interchange.c
index 2f97b081c..9d7aa42fd 100644
--- a/src/cairo-pdf-interchange.c
+++ b/src/cairo-pdf-interchange.c
@@ -52,6 +52,7 @@
#include "cairo-array-private.h"
#include "cairo-error-private.h"
#include "cairo-output-stream-private.h"
+#include "cairo-recording-surface-inline.h"
#include "cairo-recording-surface-private.h"
#include "cairo-surface-snapshot-inline.h"
@@ -2071,7 +2072,9 @@ _cairo_pdf_interchange_struct_tree_requires_recording_surface (
if (_cairo_surface_is_snapshot (recording_surface))
free_me = recording_surface = _cairo_surface_snapshot_get_target (recording_surface);
- if (_cairo_recording_surface_has_tags (recording_surface)) {
+ if (_cairo_surface_is_recording (recording_surface) &&
+ _cairo_recording_surface_has_tags (recording_surface))
+ {
/* Check if tags are to be ignored in this source */
switch (source_type) {
case CAIRO_ANALYSIS_SOURCE_PAINT: