[utilities/krusader] app: Remove a 'delete' that is not necessary

Toni Asensi Esteve <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 72f042d7bd7be9bf3dac418bf133aa9d5ce5ece2 by Toni Asensi Esteve.
Committed on 16/08/2026 at 22:14.
Pushed by asensi into branch 'master'.

Remove a 'delete' that is not necessary

Revision: https://invent.kde.org/utilities/krusader/-/merge_requests/193

M  +3    -1    app/krusader.cpp

https://invent.kde.org/utilities/krusader/-/commit/72f042d7bd7be9bf3dac418bf133aa9d5ce5ece2

diff --git a/app/krusader.cpp b/app/krusader.cpp
index a32cbf744..a8c924197 100644
--- a/app/krusader.cpp
+++ b/app/krusader.cpp
@@ -264,8 +264,10 @@ Krusader::~Krusader()
 {
     KrTrashHandler::stopWatcher();
 
-    delete MAIN_VIEW;
+    // Via setCentralWidget(), MAIN_VIEW is set as the central widget, therefore
+    // QMainWindow owns it and deletes it during the base class destruction
     MAIN_VIEW = nullptr;
+
     App = nullptr;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.