From b08b254a798d2f4935ec770662c84d86bdfea97c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C4=99drzej=20Nowacki?= Date: Mon, 23 Jan 2012 16:34:50 +0100 Subject: [PATCH] Fix null pointer call in QMetaType::destruct(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Logic has a flow causing null pointer call during destruction of an instance of a custom type in bootstrap mode. The patch doesn't include autotests, because we do not test bootstrap mode. Change-Id: Ie70c6f4226cb604f094513621d96a560e84502d7 Reviewed-by: João Abecasis --- src/corelib/kernel/qmetatype.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index e5fd8a5..a0a1295 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -1546,8 +1546,10 @@ class TypeDestructor { if (!qMetaTypeWidgetsHelper) return; dtor = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].destructor; - } else + } else { customTypeDestructor(type, where); + return; + } dtor(where); } }; -- 2.7.4