Skip to content

Commit

Permalink
Fix #388, indextool crash on unexistent index
Browse files Browse the repository at this point in the history
  • Loading branch information
klirichek committed Aug 14, 2018
1 parent 971a063 commit af2326c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/indextool.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1405,11 +1405,11 @@ int main ( int argc, char ** argv )
sphConfigureCommon ( hConf ); sphConfigureCommon ( hConf );


// common part for several commands, check and preload index // common part for several commands, check and preload index
CSphIndex * pIndex = NULL; CSphIndex * pIndex = nullptr;
while ( !sIndex.IsEmpty() && eCommand!=CMD_OPTIMIZEKLISTS ) while ( !sIndex.IsEmpty() && eCommand!=CMD_OPTIMIZEKLISTS )
{ {
// check config // check config
if ( !hConf["index"](sIndex) ) if ( !hConf["index"].Exists(sIndex) )
sphDie ( "index '%s': no such index in config\n", sIndex.cstr() ); sphDie ( "index '%s': no such index in config\n", sIndex.cstr() );


// only need config-level settings for --htmlstrip // only need config-level settings for --htmlstrip
Expand Down

0 comments on commit af2326c

Please sign in to comment.