mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(trunk gtk) fix condition that could crash in some cases when right-clicking in the file list menu.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user