From 98d35dda28451e29a3054a94e0b39bf0dd59f4e1 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 25 May 2021 14:07:28 +0100 Subject: [PATCH] vips_text() was missing a couple of unlocks --- libvips/create/text.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libvips/create/text.c b/libvips/create/text.c index fe27d10f..085535a0 100644 --- a/libvips/create/text.c +++ b/libvips/create/text.c @@ -401,14 +401,18 @@ vips_text_build( VipsObject *object ) */ if( vips_object_argument_isset( object, "height" ) && !vips_object_argument_isset( object, "dpi" ) ) { - if( vips_text_autofit( text ) ) + if( vips_text_autofit( text ) ) { + g_mutex_unlock( vips_text_lock ); return( -1 ); + } } /* Layout. Can fail for "", for example. */ - if( vips_text_get_extents( text, &extents ) ) + if( vips_text_get_extents( text, &extents ) ) { + g_mutex_unlock( vips_text_lock ); return( -1 ); + } if( extents.width == 0 || extents.height == 0 ) { vips_error( class->nickname, "%s", _( "no text to render" ) );