mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
(trunk gtk) #2198: crashed with SIGSEGV in notify.c's notifyCallback()
This commit is contained in:
+8
-6
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user