(trunk gtk) fix condition that could crash in some cases when right-clicking in the file list menu.
This commit is contained in:
parent
55381159f6
commit
018585d3b0
|
@ -770,8 +770,8 @@ onViewButtonPressed( GtkWidget * w, GdkEventButton * event, gpointer gdata )
|
|||
|
||||
if(( tor = gtr_core_find_torrent( data->core, data->torrentId )))
|
||||
{
|
||||
GtkTreePath * path;
|
||||
GtkTreeViewColumn * col;
|
||||
GtkTreePath * path = NULL;
|
||||
GtkTreeView * treeview = GTK_TREE_VIEW( w );
|
||||
|
||||
if( event->type == GDK_BUTTON_PRESS && event->button == 1
|
||||
|
@ -779,7 +779,8 @@ onViewButtonPressed( GtkWidget * w, GdkEventButton * event, gpointer gdata )
|
|||
&& getAndSelectEventPath( treeview, event, &col, &path ) )
|
||||
handled = onViewPathToggled( treeview, col, path, data );
|
||||
|
||||
gtk_tree_path_free( path );
|
||||
if( path != NULL )
|
||||
gtk_tree_path_free( path );
|
||||
}
|
||||
|
||||
return handled;
|
||||
|
|
Loading…
Reference in New Issue