add null check for qmlRegisterSingletonType()
authorTasuku Suzuki <tasuku@ptp.co.jp>
Tue, 7 Jul 2015 14:08:30 +0000 (23:08 +0900)
committerTasuku Suzuki (PTP) <tasuku@ptp.co.jp>
Fri, 24 Jul 2015 02:55:54 +0000 (02:55 +0000)
commit38a9e94e0ee5ca8bf163fd3ed8d5d6e7fda31252
treeb6de15781e72e4c771c9f20de900bc12b0dfdca5
parentbd452c3d25778dc646b8f0aff70fa6a8c7e0ebcc
add null check for qmlRegisterSingletonType()

When the callback passed to the function returns nullptr,
QQmlData::ensurePropertyCache(e, o) crashes.

Change-Id: I11efd7e9d6c5f18611e796d896384dd14a280303
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/qml/qml/qqmlmetatype.cpp