Fix segfault when closing

This commit is contained in:
Ximi1970
2020-06-04 13:04:33 +02:00
parent 531a534ff4
commit d7cf0bfae5
3 changed files with 14 additions and 2 deletions

View File

@@ -11,5 +11,6 @@
<file>files/icons/window-restore.png</file>
<file>files/icons/mail-unread.png</file>
<file>files/icons/help-about.png</file>
<file>files/icons/dialog-warning.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -419,7 +419,10 @@ void SysTrayX::slotAddOnShutdown()
/*
* Hide systray icon to prevent ghost systray icon in Windows
*/
m_tray_icon->hide();
if( m_tray_icon )
{
m_tray_icon->hide();
}
/*
* Close the TB window
@@ -448,7 +451,10 @@ void SysTrayX::slotShutdown()
/*
* Hide systray icon to prevent ghost systray icon in Windows
*/
m_tray_icon->hide();
if( m_tray_icon )
{
m_tray_icon->hide();
}
/*
* Close the TB window
@@ -494,5 +500,10 @@ void SysTrayX::slotVersion( QString version )
m_tray_icon->showMessage("SysTray-X Warning", "Version mismatch addon and app",
QSystemTrayIcon::Warning );
}
if( m_tray_icon2 )
{
m_tray_icon2->showMessage("SysTray-X Warning", "Version mismatch addon and app", ":/files/icons/dialog-warning.png" );
}
}
}