From 2a770f61c060d19f7fe118c2a066306fa3e9ec3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20Goudout?= <theo.goudout@mydatakeeper.fr>
Date: Thu, 1 Aug 2019 08:24:29 +0000
Subject: [PATCH] Fix assert fail when copying data from received message

---
 src/message.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/message.cpp b/src/message.cpp
index 3f0cac4..1c4caab 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -350,7 +350,9 @@ void MessageIter::copy_data(MessageIter &to)
       (
         (DBusMessageIter *) & (to._iter),
         from.type(),
-        from.type() == DBUS_TYPE_VARIANT ? NULL : sig,
+        (from.type() == DBUS_TYPE_STRUCT || from.type() == DBUS_TYPE_DICT_ENTRY)
+            ? NULL
+            : sig,
         (DBusMessageIter *) & (to_container._iter)
       );
 
-- 
2.22.0

