Merge pull request #1867 from tmatth/bugfix/tray-crash

UI: fix crash due to NULL dereference
This commit is contained in:
Jim 2019-05-03 08:26:57 -07:00 committed by GitHub
commit 131cfaf4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6830,7 +6830,7 @@ void OBSBasic::IconActivated(QSystemTrayIcon::ActivationReason reason)
void OBSBasic::SysTrayNotify(const QString &text,
QSystemTrayIcon::MessageIcon n)
{
if (QSystemTrayIcon::supportsMessages()) {
if (trayIcon && QSystemTrayIcon::supportsMessages()) {
QSystemTrayIcon::MessageIcon icon =
QSystemTrayIcon::MessageIcon(n);
trayIcon->showMessage("OBS Studio", text, icon, 10000);