diff --git a/src/rpc/command_map.cc b/src/rpc/command_map.cc index 93d70073..96bfadbd 100644 --- a/src/rpc/command_map.cc +++ b/src/rpc/command_map.cc @@ -102,7 +102,7 @@ CommandMap::call_command_d(key_type key, core::Download* download, const mapped_ if (itr == base_type::end()) throw torrent::input_error("Command \"" + std::string(key) + "\" does not exist."); - if (itr->second.m_downloadSlot == NULL) { + if (itr->second.m_downloadSlot == NULL || download == NULL) { if (itr->second.m_genericSlot == NULL) throw torrent::input_error("Command does not have a generic slot."); diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc index fb85914f..e0c41304 100644 --- a/src/ui/download_list.cc +++ b/src/ui/download_list.cc @@ -292,7 +292,7 @@ DownloadList::receive_exit_input(Input type) { break; case INPUT_COMMAND: - rpc::parse_command_single_std(input->str()); + rpc::parse_command_d_single_std(current_view()->focus() != current_view()->end_visible() ? *current_view()->focus() : NULL, input->str()); break; default: