[vlc-commits] Qt: fix a potential crash with the systray management

Jean-Baptiste Kempf git at videolan.org
Mon Sep 26 01:36:17 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Sep 26 01:36:00 2011 +0200| [f765c77217dd01a689ea752ae5456660634f1341] | committer: Jean-Baptiste Kempf

Qt: fix a potential crash with the systray management

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f765c77217dd01a689ea752ae5456660634f1341
---

 modules/gui/qt4/main_interface.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 41fea29..c873273 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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 )
 {



More information about the vlc-commits mailing list