changeset 35351:92f6fc87ddc8

Fix segmentation fault with mouse button release. This happens if, after selecting a file from the file selector, the mouse pointer happens to be over a GUI item when being released (an item which hasn't been previously selected).
author ib
date Thu, 22 Nov 2012 14:01:41 +0000
parents ee265b18d653
children 96cda43fe250
files gui/ui/main.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/main.c	Thu Nov 22 13:57:40 2012 +0000
+++ b/gui/ui/main.c	Thu Nov 22 14:01:41 2012 +0000
@@ -484,8 +484,8 @@
             item=&guiApp.mainItems[SelectedItem];
             item->pressed=btnReleased;
            }
+          if ( currentselected == - 1 || SelectedItem == -1 ) { itemtype=0; break; }
           SelectedItem=-1;
-          if ( currentselected == - 1 ) { itemtype=0; break; }
           value=0;
           switch( itemtype )
            {