Fix license headers: Quassel IRC Team -> Quassel Project, 2007 -> 2008
[quassel.git] / src / qtopia / mainwidget.cpp
index 431a730..e8d1184 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-07 by the Quassel IRC Team                         *
+ *   Copyright (C) 2005-08 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -37,6 +37,11 @@ MainWidget::~MainWidget() {
 }
 
 void MainWidget::setBuffer(Buffer *buf) {
+  if(!buf) {
+    ui.stack->setCurrentIndex(0);
+    currentBuffer = 0;
+    return;
+  }
   //  TODO update topic if changed; handle status buffer display
   QString title = QString("%1 (%2): \"%3\"").arg(buf->name()).arg(buf->networkName()).arg(buf->topic());
   ui.topicBar->setContents(title);