safer implementation of tr_torrentName()

This commit is contained in:
Jordan Lee 2013-05-22 22:56:13 +00:00
parent 027e3f3066
commit 96aaa41218
1 changed files with 1 additions and 3 deletions

View File

@ -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