Fix possible null pointer dereference.

This commit is contained in:
Bill King
2010-06-24 10:13:32 +10:00
parent 8744dab398
commit ce448b3e04

View File

@@ -170,7 +170,7 @@ void PluginView::updateList()
m_items.append(defaultCollectionItem);
Qt::CheckState groupState = Qt::Unchecked;
int state = parsePluginSpecs(defaultCollectionItem, groupState, defaultCollection->plugins());
int state = parsePluginSpecs(defaultCollectionItem, groupState, defaultCollection ? defaultCollection->plugins() : QList<PluginSpec *>());
defaultCollectionItem->setIcon(0, iconForState(state));
defaultCollectionItem->setData(C_LOAD, Qt::CheckStateRole, QVariant(groupState));