mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
fix core when deleting collection
that is not swapped out.
This commit is contained in:
parent
bca24fb0e6
commit
cfb2ab7e82
@ -592,7 +592,10 @@ void CollectionRec::setBasePtr ( char rdbId , class RdbBase *base ) {
|
|||||||
// if in the process of swapping in, this will be false...
|
// if in the process of swapping in, this will be false...
|
||||||
//if ( m_swappedOut ) { char *xx=NULL;*xx=0; }
|
//if ( m_swappedOut ) { char *xx=NULL;*xx=0; }
|
||||||
if ( rdbId < 0 || rdbId >= RDB_END ) { char *xx=NULL;*xx=0; }
|
if ( rdbId < 0 || rdbId >= RDB_END ) { char *xx=NULL;*xx=0; }
|
||||||
if ( m_bases[ (unsigned char)rdbId ]){ char *xx=NULL;*xx=0; }
|
// Rdb::deleteColl() will call this even though we are swapped in
|
||||||
|
// but it calls it with "base" set to NULL after it nukes the RdbBase
|
||||||
|
// so check if base is null here.
|
||||||
|
if ( base && m_bases[ (unsigned char)rdbId ]){ char *xx=NULL;*xx=0; }
|
||||||
m_bases [ (unsigned char)rdbId ] = base;
|
m_bases [ (unsigned char)rdbId ] = base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user