]> git.sesse.net Git - vlc/commitdiff
Qt: fix a potential crash with the systray management
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Sep 2011 23:36:00 +0000 (01:36 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Sep 2011 23:36:00 +0000 (01:36 +0200)
modules/gui/qt4/main_interface.cpp

index 41fea294005025813505cc1a9ea1ecbdadd90109..c873273858e0e2608f09870676a1e4291820d510 100644 (file)
@@ -1044,9 +1044,11 @@ void MainInterface::toggleUpdateSystrayMenu()
         hide();
 #endif
     }
-    QVLCMenu::updateSystrayMenu( this, p_intf );
+    if( sysTray )
+        QVLCMenu::updateSystrayMenu( this, p_intf );
 }
 
+/* First Item of the systray menu */
 void MainInterface::showUpdateSystrayMenu()
 {
     if( isHidden() )
@@ -1058,12 +1060,14 @@ void MainInterface::showUpdateSystrayMenu()
     QVLCMenu::updateSystrayMenu( this, p_intf );
 }
 
+/* First Item of the systray menu */
 void MainInterface::hideUpdateSystrayMenu()
 {
     hide();
     QVLCMenu::updateSystrayMenu( this, p_intf );
 }
 
+/* Click on systray Icon */
 void MainInterface::handleSystrayClick(
                                     QSystemTrayIcon::ActivationReason reason )
 {