From cebae7d0725426bd28f9ba8ddbd2ab6fb3dc93db Mon Sep 17 00:00:00 2001 From: William JCM Date: Mon, 5 Oct 2020 10:36:23 +0200 Subject: [PATCH] Additional safety in fileUpdateEvent. --- GUI/EvtMainFrame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GUI/EvtMainFrame.cpp b/GUI/EvtMainFrame.cpp index 73908d6..51dd4f0 100644 --- a/GUI/EvtMainFrame.cpp +++ b/GUI/EvtMainFrame.cpp @@ -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); }