Call wait_for_search_finished() only when quitting
authorMarco Costalba <mcostalba@gmail.com>
Mon, 26 Mar 2012 17:35:23 +0000 (18:35 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 26 Mar 2012 17:44:30 +0000 (18:44 +0100)
commitd11a52990459601e46e02a8759616737dc045f74
tree061053d77430dcdf3e994f1589145e05999962f8
parent3aa471f2a9cb1cccd37c27906dd386b9724e32ab
Call wait_for_search_finished() only when quitting

When quitting we should avoid RootPosition to be
destroyed while threads are still running, leading
to a crash. In case of a "stop" or "ponderhit"
command there is no need for the UI thread to wait.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/uci.cpp