Additional safety in fileUpdateEvent.

This commit is contained in:
Guillaume Jacquemin 2020-10-05 10:36:23 +02:00
parent 4c0f1b8ce5
commit cebae7d072
1 changed files with 2 additions and 2 deletions

View File

@ -439,10 +439,10 @@ void EvtMainFrame::fileUpdateEvent(wxFileSystemWatcherEvent& event) {
if(event_path == Utility::Directory::toNativeSeparators(_massManager->saveDirectory())) {
saveFileEventHandler(event_type, event_file, event);
}
else if(event_path == Utility::Directory::toNativeSeparators(_massManager->stagingAreaDirectory())) {
else if(_massManager && event_path == Utility::Directory::toNativeSeparators(_massManager->stagingAreaDirectory())) {
stagingFileEventHandler(event_type, event_file, event);
}
else if(event_path == Utility::Directory::toNativeSeparators(_screenshotManager->screenshotDirectory())) {
else if(_screenshotManager && event_path == Utility::Directory::toNativeSeparators(_screenshotManager->screenshotDirectory())) {
screenshotFileEventHandler(event_type, event_file);
}