alerting race condition fix
authordeztructor <denis.zalewsky@gmail.com>
Tue, 17 Nov 2009 08:58:01 +0000 (08:58 +0000)
committerdeztructor <denis.zalewsky@gmail.com>
Tue, 17 Nov 2009 08:58:01 +0000 (08:58 +0000)
git-svn-id: file:///svnroot/qtrapids/trunk@25 42ac0dd5-4c8c-4c71-bb3e-ecdfe252ffda

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;