QList<QAction*> VersionControlObserver::actions(const KFileItemList& items) const
{
QList<QAction*> actions;
- if (!m_model) {
+
+ bool hasNullItems = false;
+ foreach (const KFileItem& item, items) {
+ if (item.isNull()) {
+ kWarning() << "Requesting version-control-actions for empty items";
+ hasNullItems = true;
+ break;
+ }
+ }
+
+ if (!m_model || hasNullItems) {
return actions;
}
connect(m_updateItemStatesThread, SIGNAL(finished()),
m_updateItemStatesThread, SLOT(deleteLater()));
}
- if (m_updateItemStatesThread->isRunning()) {
+ else {
// An update is currently ongoing. Wait until the thread has finished
// the update (see slotThreadFinished()).
m_pendingItemStatesUpdate = true;