From 0260c57027540bfed82670dba059088d45dcb38f Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Sun, 3 Oct 2010 14:30:07 +0100 Subject: Add an extra assert for replacing messages in ChatView. diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp index 0f7e87b..d7077a5 100644 --- a/Swift/QtUI/QtChatView.cpp +++ b/Swift/QtUI/QtChatView.cpp @@ -95,6 +95,7 @@ void QtChatView::addToDOM(boost::shared_ptr snippet) { void QtChatView::replaceLastMessage(const QString& newMessage) { /* FIXME: must be queued? */ bool bottom = isScrolledToBottom(); + assert(!lastElement_.isNull()); QWebElement replace = lastElement_.findFirst("span.swift_message"); assert(!replace.isNull()); QString old = lastElement_.toOuterXml(); -- cgit v0.10.2-6-g49f6