struct verify_data * data = vdata;
tr_torrent * tor = data->tor;
+ if (tor->isDeleting)
+ goto cleanup;
+
if (!data->aborted)
tr_torrentRecheckCompleteness (tor);
torrentStart (tor, false);
}
+cleanup:
tr_free (data);
}
{
struct verify_data * data = vdata;
assert (data->tor == tor);
+
+ if (tor->isDeleting)
+ {
+ tr_free (data);
+ return;
+ }
+
data->aborted = aborted;
tr_runInEventThread (tor->session, onVerifyDoneThreadFunc, data);
}
tr_torrent * tor = data->tor;
tr_sessionLock (tor->session);
+ if (tor->isDeleting)
+ {
+ tr_free (data);
+ goto unlock;
+ }
+
/* if the torrent's already being verified, stop it */
tr_verifyRemove (tor);
else
tr_verifyAdd (tor, onVerifyDone, data);
+unlock:
tr_sessionUnlock (tor->session);
}