[Konversation-devel] [Bug 232785] Crash on DCC Chat
Eli MacKenzie
argonel at gmail.com
Wed Mar 31 18:59:23 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=232785
Eli MacKenzie <argonel at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #9 from Eli MacKenzie <argonel gmail com> 2010-03-31 18:59:20 ---
commit 51c20ebc0cb6a15aa69c96c364d956c5fdbc16a9
Author: eli mackenzie <argonel at gmail.com>
Date: Wed Mar 31 12:50:19 2010 -0400
prevent a dcc chat from failing at creation
-uninitialized variables are not your friend
-ensure text view is created even if m_chatExtension has a strange value
BUG:232785
diff --git a/src/dcc/chat.cpp b/src/dcc/chat.cpp
index 7eda290..cc5d15a 100644
--- a/src/dcc/chat.cpp
+++ b/src/dcc/chat.cpp
@@ -42,7 +42,8 @@ namespace Konversation
m_selfOpened(true),
m_dccSocket(0),
m_dccServer(0),
- m_chatStatus(Configuring)
+ m_chatStatus(Configuring),
+ m_chatExtension(Unknown)
{
kDebug();
// set default values
diff --git a/src/dcc/chatcontainer.cpp b/src/dcc/chatcontainer.cpp
index ca5b866..96ecb8d 100644
--- a/src/dcc/chatcontainer.cpp
+++ b/src/dcc/chatcontainer.cpp
@@ -48,13 +48,7 @@ namespace Konversation
m_headerSplitter->setStretchFactor(m_headerSplitter->indexOf(m_topicLabel), 0);
// setup layout
- if (m_chat->extension() == Chat::SimpleChat || m_chat->extension()
== Chat::Unknown)
- {
- IRCViewBox *ircViewBox = new IRCViewBox(m_headerSplitter, 0);
-
m_headerSplitter->setStretchFactor(m_headerSplitter->indexOf(ircViewBox), 1);
- setTextView(ircViewBox->ircView());
- }
- else if (m_chat->extension() == Chat::Whiteboard)
+ if (m_chat->extension() == Chat::Whiteboard)
{
QSplitter* chatSplitter = new QSplitter(Qt::Vertical);
@@ -70,6 +64,12 @@ namespace Konversation
m_headerSplitter->addWidget(chatSplitter);
}
+ else //(m_chat->extension() == Chat::SimpleChat ||
m_chat->extension() == Chat::Unknown)
+ {
+ IRCViewBox *ircViewBox = new IRCViewBox(m_headerSplitter, 0);
+
m_headerSplitter->setStretchFactor(m_headerSplitter->indexOf(ircViewBox), 1);
+ setTextView(ircViewBox->ircView());
+ }
m_dccChatInput = new IRCInput(this);
getTextView()->installEventFilter(m_dccChatInput);
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list