Add check against empty files somehow adding to recent file lists

This commit is contained in:
baldurk
2018-01-02 16:06:13 +00:00
parent e3ead220f6
commit 1b50521704
@@ -341,6 +341,12 @@ void AddRecentFile(rdcarray<rdcstr> &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);