mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Add workaround for crash on some jdenticon inputs
This commit is contained in:
parent
f032c75e6a
commit
f91a0267e6
1 changed files with 8 additions and 3 deletions
|
@ -62,9 +62,14 @@ JdenticonResponse::run()
|
||||||
painter.setRenderHint(QPainter::Antialiasing, true);
|
painter.setRenderHint(QPainter::Antialiasing, true);
|
||||||
painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
|
painter.setRenderHint(QPainter::SmoothPixmapTransform, true);
|
||||||
|
|
||||||
|
try {
|
||||||
QSvgRenderer renderer{
|
QSvgRenderer renderer{
|
||||||
jdenticonInterface_->generate(m_key, m_requestedSize.width()).toUtf8()};
|
jdenticonInterface_->generate(m_key, m_requestedSize.width()).toUtf8()};
|
||||||
renderer.render(&painter);
|
renderer.render(&painter);
|
||||||
|
} catch (std::exception &e) {
|
||||||
|
nhlog::ui()->error(
|
||||||
|
"caught {} in jdenticonprovider, key '{}'", e.what(), m_key.toStdString());
|
||||||
|
}
|
||||||
|
|
||||||
painter.end();
|
painter.end();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue