Commit 82590da1 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Fix wrong memory access that may cause crash

When editing the quick annotations
parent 924a5fb9
Pipeline #38936 passed with stage
in 67 minutes and 52 seconds
......@@ -136,7 +136,6 @@ QDomDocument EditAnnotToolDialog::toolXml() const
engineElement.appendChild(annotationElement);
const QString color = m_stubann->style().color().name(QColor::HexArgb);
const QString textColor = static_cast<Okular::TextAnnotation *>(m_stubann)->textColor().name();
const QString opacity = QString::number(m_stubann->style().opacity());
const QString width = QString::number(m_stubann->style().width());
......@@ -252,6 +251,7 @@ QDomDocument EditAnnotToolDialog::toolXml() const
annotationElement.setAttribute(QStringLiteral("icon"), sa->stampIconName());
} else if (toolType == ToolTypewriter) {
Okular::TextAnnotation *ta = static_cast<Okular::TextAnnotation *>(m_stubann);
const QString textColor = ta->textColor().name();
toolElement.setAttribute(QStringLiteral("type"), QStringLiteral("typewriter"));
engineElement.setAttribute(QStringLiteral("type"), QStringLiteral("PickPoint"));
engineElement.setAttribute(QStringLiteral("block"), QStringLiteral("true"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment