(trunk gtk) #2198: crashed with SIGSEGV in notify.c's notifyCallback()

This commit is contained in:
Charles Kerr 2009-06-11 14:59:50 +00:00
parent 6e10ee3baa
commit c2dd366154
1 changed files with 8 additions and 6 deletions

View File

@ -49,13 +49,15 @@ notifyCallback( NotifyNotification * n UNUSED,
}
else if( !strcmp( action, "file" ) )
{
tr_torrent * tor = tr_torrent_handle( gtor );
tr_torrent * tor = tr_torrent_handle( gtor );
const tr_info * info = tr_torrent_info( gtor );
char * path =
g_build_filename( tr_torrentGetDownloadDir(
tor ), info->files[0].name, NULL );
gtr_open_file( path );
g_free( path );
if( tor && info )
{
const char * dir = tr_torrentGetDownloadDir( tor );
char * path = g_build_filename( dir, info->files[0].name, NULL );
gtr_open_file( path );
g_free( path );
}
}
}