Skip to content
Permalink
Browse files

Merge PR #2478: Log: check for QSizeF::isValid() in Log::validHtml()

  • Loading branch information...
mkrautz committed Jul 31, 2016
2 parents 3923ce8 + fb19de1 commit b126c4e206ec5b417dbf435c499872e6dd089838
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/mumble/Log.cpp
@@ -416,12 +416,12 @@ QString Log::validHtml(const QString &html, bool allowReplacement, QTextCursor *
qtd.adjustSize();
QSizeF s = qtd.size();

if (!valid || (s.width() > qr.width()) || (s.height() > qr.height())) {
if (!valid || !s.isValid() || (s.width() > qr.width()) || (s.height() > qr.height())) {
qtd.setPlainText(html);
qtd.adjustSize();
s = qtd.size();

if ((s.width() > qr.width()) || (s.height() > qr.height())) {
if (!s.isValid() || (s.width() > qr.width()) || (s.height() > qr.height())) {
QString errorMessage = tr("[[ Text object too large to display ]]");
if (tc) {
tc->insertText(errorMessage);

0 comments on commit b126c4e

Please sign in to comment.
You can’t perform that action at this time.