Changeset 8670


Ignore:
Timestamp:
Jun 11, 2009, 2:59:50 PM (13 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/notify.c

    r7943 r8670  
    5050    else if( !strcmp( action, "file" ) )
    5151    {
    52         tr_torrent *    tor = tr_torrent_handle( gtor );
     52        tr_torrent * tor = tr_torrent_handle( gtor );
    5353        const tr_info * info = tr_torrent_info( gtor );
    54         char *          path =
    55             g_build_filename( tr_torrentGetDownloadDir(
    56                                   tor ), info->files[0].name, NULL );
    57         gtr_open_file( path );
    58         g_free( path );
     54        if( tor && info )
     55        {
     56            const char * dir = tr_torrentGetDownloadDir( tor );
     57            char * path = g_build_filename( dir, info->files[0].name, NULL );
     58            gtr_open_file( path );
     59            g_free( path );
     60        }
    5961    }
    6062}
Note: See TracChangeset for help on using the changeset viewer.