The code does detect that it's invalid and errors out before returning early, but for some reason it crashes when cleaning up the QScopedPointer. It could be that the errorOccurred signal being emitted causes something to get deleted, e.g. in ProjectManager::onCreationFailed().