alerting race condition fix
[qtrapids] / src / server / TorrentSession.cpp
index 486848d..aa1f105 100644 (file)
@@ -48,6 +48,12 @@ namespace qtrapids
 
 
             if (ta) {
+
+                if (!ta->handle.is_valid()) {
+                    qDebug() << "handle is invalid";
+                    return;
+                }
+
                 TorrentHandle handle(ta->handle);
                 TorrentState state;