From 96aaa412185461f5c74f0117b14b9fd35599f5b1 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 22 May 2013 22:56:13 +0000 Subject: [PATCH] safer implementation of tr_torrentName() --- libtransmission/torrent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 4a3e94d14..ed6dbe7fb 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -74,9 +74,7 @@ const char * tr_torrentName (const tr_torrent * tor) { - assert (tr_isTorrent (tor)); - - return tor->info.name; + return tor ? tor->info.name : ""; } int