From 90809a0fbdf171e969f9a7dc951f5b9ae819e732 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 1 Nov 2022 09:20:09 +0900 Subject: [PATCH] Fixed SEGV caused by dereferencing null pointer. This resolves issue #3. Signed-off-by: Michele Calgaro --- src/part/radialMap/widget.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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