fix crash when passing in an uninitialized entry to session::load_state

This commit is contained in:
Arvid Norberg 2011-06-05 06:42:51 +00:00
parent 68dee0342b
commit f60e88e7f8
1 changed files with 1 additions and 0 deletions

View File

@ -500,6 +500,7 @@ namespace libtorrent
#ifndef TORRENT_NO_DEPRECATE
void session::load_state(entry const& ses_state)
{
if (ses_state.type() == entry::undefined_t) return;
std::vector<char> buf;
bencode(std::back_inserter(buf), ses_state);
lazy_entry e;