From 901e9dcbf13b658545d5bc1e2d96ccac2ed61111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 18 Oct 2016 17:34:52 +0200 Subject: converter: stop looking if w'eve no entryType --- libqmenumodel/src/converter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libqmenumodel') diff --git a/libqmenumodel/src/converter.cpp b/libqmenumodel/src/converter.cpp index aef34d0..1b63272 100644 --- a/libqmenumodel/src/converter.cpp +++ b/libqmenumodel/src/converter.cpp @@ -340,6 +340,8 @@ GVariant* Converter::toGVariantWithSchema(const QVariant &value, const char* sch if (data) { g_variant_builder_add_value(b, data); entryType = g_variant_type_next(entryType); + if (!entryType) + break; } else { ok = false; qWarning() << "Failed to convert list to array with schema:" << schema; -- cgit v1.2.3