Fix crash in case of error

the QObject::parent() is 0
This commit is contained in:
Olivier Goffart 2013-08-28 21:26:42 +02:00
parent 18a58f73de
commit a27c8ad90c

View file

@ -50,8 +50,7 @@ void FolderWatcherPrivate::slotAddFolderRecursive(const QString &path)
qDebug() << "(+) Watcher:" << path;
if (!_inotify->addPath(path)) {
FolderWatcher *fw = qobject_cast<FolderWatcher*>(parent());
emit fw->error(tr("Could not monitor directories due to system limitations.\n"
emit _parent->error(tr("Could not monitor directories due to system limitations.\n"
"The application will not work reliably. Please check the\n"
"documentation for possible fixes."));
}