Initialise CServerDlg::bSystemTrayIconAvaialbe earlier.

The call to setupUi ends up changing the window title, which invokes
changeEvent; this avoids an uninitialised read there.
This commit is contained in:
Adam Sampson 2020-06-21 13:55:08 +01:00
parent 7ee8f6264a
commit 773e274098

View file

@ -37,6 +37,9 @@ CServerDlg::CServerDlg ( CServer* pNServP,
BitmapSystemTrayInactive ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDGreyArrow.png" ) ),
BitmapSystemTrayActive ( QString::fromUtf8 ( ":/png/LEDs/res/CLEDGreenArrow.png" ) )
{
// check if system tray icon can be used
bSystemTrayIconAvaialbe = SystemTrayIcon.isSystemTrayAvailable();
setupUi ( this );
@ -143,9 +146,6 @@ CServerDlg::CServerDlg ( CServer* pNServP,
+ tr ( "During a recording session, the button can be used to start a new recording." ) );
// check if system tray icon can be used
bSystemTrayIconAvaialbe = SystemTrayIcon.isSystemTrayAvailable();
// init system tray icon
if ( bSystemTrayIconAvaialbe )
{