From 1b50521704358fbfcff1d5697fc68eecf478aa66 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 2 Jan 2018 16:06:13 +0000 Subject: [PATCH] Add check against empty files somehow adding to recent file lists --- qrenderdoc/Code/Interface/PersistantConfig.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qrenderdoc/Code/Interface/PersistantConfig.cpp b/qrenderdoc/Code/Interface/PersistantConfig.cpp index c5b95dece..ae2cee92a 100644 --- a/qrenderdoc/Code/Interface/PersistantConfig.cpp +++ b/qrenderdoc/Code/Interface/PersistantConfig.cpp @@ -341,6 +341,12 @@ void AddRecentFile(rdcarray &recentList, const rdcstr &file, int maxItem QDir dir(file); QString path = dir.canonicalPath(); + if(path.isEmpty()) + { + qWarning() << "Got empty path from " << ToQStr(file); + return; + } + if(!recentList.contains(path)) { recentList.push_back(path);