# HG changeset patch # User ib # Date 1353592901 0 # Node ID 92f6fc87ddc81eb60da035b02181c87087f91019 # Parent ee265b18d6532e39eb7c3fa6d729845f421f91ce 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). diff -r ee265b18d653 -r 92f6fc87ddc8 gui/ui/main.c --- 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 ) {