From: romibi Date: Thu, 16 Jun 2016 22:50:40 +0000 (+0200) Subject: Fix crash if topic has a CarriageReturn X-Git-Tag: travis-deploy-test~441 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=d3f99ef6bfc13599dcbddc2f84d29351b7a07d87;hp=9219f29de491af4a990deec79e658ccf2ab9f9bf Fix crash if topic has a CarriageReturn Resolves GH-218. --- diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index f31838c9..b449f12a 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -281,6 +281,9 @@ QString TopicWidget::sanitizeTopic(const QString& topic) // some unicode characters with a new line, which then triggers // a stack overflow later QString result(topic); +#if QT_VERSION >= 0x050000 + result.replace(QChar::CarriageReturn, " "); +#endif result.replace(QChar::ParagraphSeparator, " "); result.replace(QChar::LineSeparator, " ");