Fix null pointer call in QMetaType::destruct().

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 <joao.abecasis@nokia.com>
bb10
Jędrzej Nowacki 2012-01-23 16:34:50 +01:00 committed by Qt by Nokia
parent f91c39fe3a
commit b08b254a79
1 changed files with 3 additions and 1 deletions

View File

@ -1546,8 +1546,10 @@ class TypeDestructor {
if (!qMetaTypeWidgetsHelper)
return;
dtor = qMetaTypeWidgetsHelper[type - QMetaType::FirstWidgetsType].destructor;
} else
} else {
customTypeDestructor(type, where);
return;
}
dtor(where);
}
};