From d0bb6fb5a3b58d04a68deabd8d4431b112c6c084 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 10 Oct 2010 21:05:17 +0200
Subject: Fix a crash when signing out.

Release-Notes: Don't crash when signing out.

diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp
index fcafec9..a8c8f11 100644
--- a/Swift/Controllers/EventWindowController.cpp
+++ b/Swift/Controllers/EventWindowController.cpp
@@ -18,7 +18,8 @@ EventWindowController::EventWindowController(EventController* eventController, E
 }
 
 EventWindowController::~EventWindowController() {
-	delete window_;
+	// Don't delete this, since Qt owns it
+	//delete window_;
 }
 
 void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<StanzaEvent> event) {
diff --git a/Swift/QtUI/EventViewer/QtEventWindow.cpp b/Swift/QtUI/EventViewer/QtEventWindow.cpp
index b56ee78..5200740 100644
--- a/Swift/QtUI/EventViewer/QtEventWindow.cpp
+++ b/Swift/QtUI/EventViewer/QtEventWindow.cpp
@@ -23,7 +23,7 @@
 
 namespace Swift {
 
-QtEventWindow::QtEventWindow(UIEventStream* eventStream, QWidget* parent) : QWidget(parent) {
+QtEventWindow::QtEventWindow(UIEventStream* eventStream) {
 	QBoxLayout* layout = new QBoxLayout(QBoxLayout::TopToBottom, this);
 	layout->setContentsMargins(0,0,0,0);
 	layout->setSpacing(0);
diff --git a/Swift/QtUI/EventViewer/QtEventWindow.h b/Swift/QtUI/EventViewer/QtEventWindow.h
index b49660a..03f009b 100644
--- a/Swift/QtUI/EventViewer/QtEventWindow.h
+++ b/Swift/QtUI/EventViewer/QtEventWindow.h
@@ -22,7 +22,7 @@ namespace Swift {
 	class QtEventWindow : public QWidget, public EventWindow {
 		Q_OBJECT
 		public:
-			QtEventWindow(UIEventStream* eventStream, QWidget* parent = 0);
+			QtEventWindow(UIEventStream* eventStream);
 			~QtEventWindow();
 			void addEvent(boost::shared_ptr<StanzaEvent> event, bool active);
 			void removeEvent(boost::shared_ptr<StanzaEvent> event);
-- 
cgit v0.10.2-6-g49f6