diff --git a/src/command_download.cc b/src/command_download.cc index a910c178..98057744 100644 --- a/src/command_download.cc +++ b/src/command_download.cc @@ -431,6 +431,9 @@ p_call_target(const torrent::Object::list_type& args) { const std::string& peer_id = itr++->as_string(); const std::string& command_key = itr++->as_string(); + if (download == nullptr) + throw torrent::input_error("invalid parameters: info-hash not found"); + torrent::HashString hash; if (peer_id.size() != 40)