fix a handful of console warnings that were generated by trying to trash a NULL .torrent file b/c the torrent had been added from a URL

This commit is contained in:
Jordan Lee
2012-09-23 15:38:07 +00:00
parent 36e1337e68
commit 33c4d25f19
2 changed files with 12 additions and 5 deletions

View File

@@ -299,8 +299,12 @@ on_tree_view_button_released( GtkWidget * view,
int
gtr_file_trash_or_remove( const char * filename )
{
GFile * file;
gboolean trashed = FALSE;
GFile * file = g_file_new_for_path( filename );
g_return_val_if_fail (filename && *filename, 0);
file = g_file_new_for_path( filename );
if( gtr_pref_flag_get( PREF_KEY_TRASH_CAN_ENABLED ) ) {
GError * err = NULL;