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