diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-11-01 09:20:09 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-11-01 09:20:09 +0900 |
commit | 90809a0fbdf171e969f9a7dc951f5b9ae819e732 (patch) | |
tree | a4381bb0abd858e0c682d7989c06cc9fe245fced | |
parent | 0fd96573f7172106e176002b3b41aa9ef7ffc81a (diff) | |
download | filelight-90809a0fbdf171e969f9a7dc951f5b9ae819e732.tar.gz filelight-90809a0fbdf171e969f9a7dc951f5b9ae819e732.zip |
Fixed SEGV caused by dereferencing null pointer. This resolves issue #3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | src/part/radialMap/widget.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/part/radialMap/widget.cpp b/src/part/radialMap/widget.cpp index 0520f9e..79e2ed9 100644 --- a/src/part/radialMap/widget.cpp +++ b/src/part/radialMap/widget.cpp @@ -42,7 +42,15 @@ RadialMap::Widget::path() const KURL RadialMap::Widget::url( File const * const file ) const { - return KURL::fromPathOrURL( file ? file->fullPath() : m_tree->fullPath() ); + if (file) + { + return KURL::fromPathOrURL(file->fullPath()); + } + if (m_tree) + { + return KURL::fromPathOrURL(m_tree->fullPath()); + } + return KURL::fromPathOrURL(TQString::null); } void |