summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2012-09-25 11:40:22 +0200
committerUli Schlachter <psychon@znc.in>2012-09-25 11:44:54 +0200
commit2be125817ade58ca25cc6cc6b23e2f4dbea722c6 (patch)
treeba1f1e5ed2a198c36eb956571ec220fe24e8b6d6
parentf2720e2ba1f68e9ec8f8822e41f4045663e99ad8 (diff)
surface: Check reference count right before free
This makes sure that nothing took a reference during finishing and during detaching user and mime-data. Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--src/cairo-surface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index dcce41ed..cbb2cfe7 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -943,8 +943,6 @@ cairo_surface_destroy (cairo_surface_t *surface)
return;
_cairo_surface_finish (surface);
- /* paranoid check that nobody took a reference whilst finishing */
- assert (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count));
}
if (surface->damage)
@@ -957,7 +955,9 @@ cairo_surface_destroy (cairo_surface_t *surface)
cairo_device_destroy (surface->device);
assert (surface->snapshot_of == NULL);
- assert (!_cairo_surface_has_snapshots (surface));
+ assert (! _cairo_surface_has_snapshots (surface));
+ /* paranoid check that nobody took a reference whilst finishing */
+ assert (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count));
free (surface);
}