kfile: improve URL sanity check in KDirOperator::setUrl()

This commit is contained in:
Ivailo Monev 2016-04-23 20:58:28 +00:00
parent 6ca6c7ed22
commit a4448333c4

View file

@ -960,7 +960,7 @@ void KDirOperator::setUrl(const KUrl& _newurl, bool clearforward)
{
KUrl newurl;
if (!_newurl.isValid())
if (!_newurl.isValid() || newurl.toLocalFile().isEmpty())
newurl = QUrl::fromLocalFile(QDir::homePath());
else
newurl = _newurl;