Control: tag -1 patch upstream X-Debbugs-CC: allan grossman <wizard10...@gmail.com>
On Wed, Jul 21, 2021 at 04:47:17PM -0500, allan wrote: > [General] > disabledTrayIcon=true Okay, I can reproduce the crash now with that setting. The update check silently assumes that tray and its associated member variables have been initialized. The attached patch at least prevents flameshot from crashing. A proper fix would ensure that any enabled feature that depends on disabled features automatically gets disabled, too. Regards.
Description: Fix nullptr dereference It occurs when the user has disabledTrayIcon=true, but also checkForUpdates=true (explicitly or the default). Last-Update: 2021-07-22 Author: Dennis Filder <d.fil...@web.de> --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -192,7 +192,8 @@ m_appLatestUrl = json["html_url"].toString(); QString newVersion = tr("New version %1 is available").arg(m_appLatestVersion); - m_appUpdates->setText(newVersion); + if (m_appUpdates != nullptr) + m_appUpdates->setText(newVersion); if (m_showCheckAppUpdateStatus) { sendTrayNotification(newVersion, "Flameshot"); QDesktopServices::openUrl(QUrl(m_appLatestUrl));