From 773e2740986dcf838073c6bc15f4d3d8718e85c8 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 21 Jun 2020 13:55:08 +0100 Subject: [PATCH] Initialise CServerDlg::bSystemTrayIconAvaialbe earlier. The call to setupUi ends up changing the window title, which invokes changeEvent; this avoids an uninitialised read there. --- src/serverdlg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 942e8027..9a829dea 100755 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -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 ) {