From 66e3c81fe7579c613f7156839801bcb22746f534 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sun, 13 Sep 2020 19:53:19 +0100 Subject: [PATCH] Ensure VImage::set uses class to determine type Prevents null GType and associated segfault --- cplusplus/VImage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cplusplus/VImage.cpp b/cplusplus/VImage.cpp index 205326d2..5ba78c54 100644 --- a/cplusplus/VImage.cpp +++ b/cplusplus/VImage.cpp @@ -193,7 +193,7 @@ VOption::set( const char *name, const VObject value ) { Pair *pair = new Pair( name ); VipsObject *object = value.get_object(); - GType type = G_VALUE_TYPE( object ); + GType type = G_VALUE_TYPE( VIPS_OBJECT_GET_CLASS( object ) ); pair->input = true; g_value_init( &pair->value, type );