protect against accessing a null

This commit is contained in:
Aaron Seigo 2011-07-13 13:16:14 +02:00
parent 201baafc1c
commit e2f4b4ecc2

View File

@ -153,8 +153,10 @@ void DialogProxy::syncMainItem()
QGraphicsWidget *widget = qobject_cast<QGraphicsWidget *>(m_mainItem.data());
if (widget) {
m_declarativeItemContainer->deleteLater();
m_declarativeItemContainer = 0;
if (m_declarativeItemContainer) {
m_declarativeItemContainer->deleteLater();
m_declarativeItemContainer = 0;
}
} else {
QDeclarativeItem *di = qobject_cast<QDeclarativeItem *>(m_mainItem.data());
if (di) {