Commit 1dc09b1b authored by Marcin Sobczyk's avatar Marcin Sobczyk
Browse files

#162 segfault when database was closed before opening

parent e3c3a534
......@@ -417,7 +417,8 @@ uint32_t database::reindex( const open_args& args )
void database::wipe( const fc::path& data_dir, const fc::path& shared_mem_dir, bool include_blocks)
{
close();
if( get_is_open() )
close();
chainbase::database::wipe( shared_mem_dir );
if( include_blocks )
{
......
......@@ -1176,6 +1176,10 @@ namespace chainbase {
const abstract_index_cntr_t& get_abstract_index_cntr() const
{ return _index_list; }
protected:
bool get_is_open() const
{ return _is_open; }
private:
template<typename MultiIndexType>
void add_index_helper() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment