filelight: fix possible crashes when attempting to navigate the radial map

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-15 03:07:10 +03:00
parent bdf203fff9
commit 7f22a2beb4

View file

@ -62,13 +62,22 @@ RadialMap::Widget::~Widget()
QString
RadialMap::Widget::path() const
{
return m_tree->fullPath();
if (m_tree) {
return m_tree->fullPath();
}
return QString();
}
KUrl
RadialMap::Widget::url(File const * const file) const
{
return KUrl(file ? file->fullPath() : m_tree->fullPath());
if (file) {
return file->fullPath();
}
if (m_tree) {
return m_tree->fullPath();
}
return KUrl();
}
void