]> git.sesse.net Git - vlc/commitdiff
* fixed a segfault in FileInfo when p_info->psz_name == NULL
authorCyril Deguet <asmax@videolan.org>
Mon, 9 Jun 2003 19:08:33 +0000 (19:08 +0000)
committerCyril Deguet <asmax@videolan.org>
Mon, 9 Jun 2003 19:08:33 +0000 (19:08 +0000)
  but there are still other segfaults sometimes in FileInfo !!

modules/gui/skins/src/skin_common.h
modules/gui/skins/x11/x11_window.cpp
modules/gui/wxwindows/fileinfo.cpp

index a67f8e1514a48e72131b491bcf3b48cc6b128511..91fe3370b7a809c5242b503d1740cdc6709f0a8f 100644 (file)
@@ -2,7 +2,7 @@
  * skin_common.h: Private Skin interface description
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: skin_common.h,v 1.17 2003/06/09 14:04:20 asmax Exp $
+ * $Id: skin_common.h,v 1.18 2003/06/09 19:08:33 asmax Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -43,6 +43,7 @@ class wxIcon;
 #define MOUSE_LEFT (1<<0)
 #define MOUSE_RIGHT (1<<1)
 #define KEY_CTRL (1<<2)
+#define KEY_SHIFT (1<<3)
 
 
 //---------------------------------------------------------------------------
index 7f6e471892d74e5dd76effbfa86e5bf391942aa8..e0a1a5826b8c4e7c3cda23c1174c5a36e35f0d1f 100644 (file)
@@ -2,7 +2,7 @@
  * x11_window.cpp: X11 implementation of the Window class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: x11_window.cpp,v 1.20 2003/06/09 14:04:20 asmax Exp $
+ * $Id: x11_window.cpp,v 1.21 2003/06/09 19:08:33 asmax Exp $
  *
  * Authors: Cyril Deguet     <asmax@videolan.org>
  *
@@ -262,8 +262,11 @@ bool X11Window::ProcessOSEvent( Event *evt )
             button = 0;
             if( ((XButtonEvent *)p2 )->state & ControlMask )
             {
-                // Control key pressed
                 button |= KEY_CTRL;
+            } 
+            if( ((XButtonEvent *)p2 )->state & ShiftMask )
+            {
+                button |= KEY_SHIFT;
             }
 
             switch( ( (XButtonEvent *)p2 )->button )
@@ -309,9 +312,13 @@ bool X11Window::ProcessOSEvent( Event *evt )
             button = 0;
             if( ((XButtonEvent *)p2 )->state & ControlMask )
             {
-                // Control key pressed
                 button |= KEY_CTRL;
             }
+            if( ((XButtonEvent *)p2 )->state & ShiftMask )
+            {
+                button |= KEY_SHIFT;
+            }
+
             switch( ( (XButtonEvent *)p2 )->button )
             {
                 case 1:
index 070980ebf97fd71d99092a26878969d7eab8db27..dfa9ece49eddd2dd658356943ede5cad7b955b0b 100644 (file)
@@ -2,7 +2,7 @@
  * fileinfo.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: fileinfo.cpp,v 1.15 2003/06/05 21:22:27 gbazin Exp $
+ * $Id: fileinfo.cpp,v 1.16 2003/06/09 19:08:33 asmax Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -117,7 +117,7 @@ void FileInfo::UpdateFileInfo()
 {
     input_thread_t *p_input = p_intf->p_sys->p_input;
 
-    if( !p_input || p_input->b_dead )
+    if( !p_input || p_input->b_dead || !p_input->psz_name )
     {
         if( fileinfo_root )
         {