mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-07 02:32:32 +00:00
Fix possible crash with save_input_history (See #26)
This commit is contained in:
+2
-2
@@ -392,7 +392,7 @@ Root::set_input_history_size(int size) {
|
||||
|
||||
void
|
||||
Root::load_input_history() {
|
||||
if (!m_control->core()->download_store()->is_enabled()) {
|
||||
if (m_control == NULL || !m_control->core()->download_store()->is_enabled()) {
|
||||
lt_log_print(torrent::LOG_DEBUG, "ignoring input history file");
|
||||
return;
|
||||
}
|
||||
@@ -460,7 +460,7 @@ Root::load_input_history() {
|
||||
|
||||
void
|
||||
Root::save_input_history() {
|
||||
if (!m_control->core()->download_store()->is_enabled())
|
||||
if (m_control == NULL || !m_control->core()->download_store()->is_enabled())
|
||||
return;
|
||||
|
||||
std::string history_filename = m_control->core()->download_store()->path() + "rtorrent.input_history";
|
||||
|
||||
Reference in New Issue
Block a user