summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-28 16:43:17 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-28 16:43:17 +0200
commit6d5470f0383f3c8a36b8d1aa57bcafb88a743a10 (patch)
tree1064ea713e6168157c87c0c330e21c615293c2fc
parentKrazy check issues fixes.. (diff)
downloadrekonq-6d5470f0383f3c8a36b8d1aa57bcafb88a743a10.tar.xz
Fixing crash on opening tabs after closing other window(s).
It was a stupid omission by me, cleverly discovered and fixed by Johannes Zellner!! Again, thank you very much!
-rw-r--r--src/application.cpp6
-rw-r--r--src/application.h2
-rw-r--r--src/mainwindow.cpp1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 683a405f..9bbf7792 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -406,6 +406,12 @@ MainWindow *Application::newMainWindow()
}
+void Application::removeMainWindow(MainWindow *window)
+{
+ m_mainWindows.removeAt(m_mainWindows.indexOf(window, 0));
+}
+
+
MainWindowList Application::mainWindowList()
{
return m_mainWindows;
diff --git a/src/application.h b/src/application.h
index 61d93b87..e5616d59 100644
--- a/src/application.h
+++ b/src/application.h
@@ -127,6 +127,8 @@ public slots:
const Rekonq::OpenType& type = Rekonq::CurrentTab
);
+ void removeMainWindow(MainWindow *window);
+
private slots:
/**
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 345cfda7..722189f5 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -143,6 +143,7 @@ MainWindow::MainWindow()
MainWindow::~MainWindow()
{
+ Application::instance()->removeMainWindow(this);
delete m_popup;
delete m_view;
}