Fix a crash on startup after disabling watching the library for changes. Fixes issue 2585

This commit is contained in:
David Sansome 2012-01-08 12:55:06 +00:00
parent bdf0ff4930
commit 2e49e89e7b
1 changed files with 3 additions and 1 deletions

View File

@ -695,7 +695,9 @@ void LibraryWatcher::ReloadSettings() {
}
if (!monitor_ && was_monitoring_before) {
fs_watcher_->Clear();
if (fs_watcher_) {
fs_watcher_->Clear();
}
} else if (monitor_ && !was_monitoring_before) {
// Add all directories to all QFileSystemWatchers again
foreach (const DirData& data, watched_dirs_.values()) {