src/download.cpp

changeset 451
7ef26b45ed55
parent 449
f462f0bd3c51
child 452
47cc663e4ff4
--- a/src/download.cpp	Sat Aug 17 02:07:49 2013 +0300
+++ b/src/download.cpp	Sat Aug 17 02:24:08 2013 +0300
@@ -411,11 +411,8 @@
 	// This is why downloading a part may end up downloading multiple files, as
 	// it resolves dependencies.
 	for (LDObject* obj : *f) {
-		if (obj->getType() != LDObject::Error)
-			continue;
-		
-		LDErrorObject* err = static_cast<LDErrorObject*> (obj);
-		if (err->fileRef() == "")
+		LDErrorObject* err = dynamic_cast<LDErrorObject*> (obj);
+		if (!err || err->fileRef().isEmpty())
 			continue;
 		
 		str dest = err->fileRef();

mercurial