fix: fix console warning when adding magnet links (#1229)

This commit is contained in:
Charles Kerr 2020-05-15 12:22:06 -05:00 committed by GitHub
parent 87ca3529b7
commit 82020d2e8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1274,7 +1274,7 @@ static bool add_file(TrCore* core, GFile* file, gboolean do_start, gboolean do_p
{
char* str = g_file_get_path(file);
if ((tried = g_file_test(str, G_FILE_TEST_EXISTS)))
if ((tried = (str != NULL) && g_file_test(str, G_FILE_TEST_EXISTS)))
{
loaded = !tr_ctorSetMetainfoFromFile(ctor, str);
}