1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-14 10:24:42 +00:00

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

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);
}