#7163: don't delete objects which a thread needs later on

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37818 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-03-01 19:39:47 +00:00
parent 5f96251222
commit ca3395ec88

View File

@ -368,7 +368,11 @@ void Loader::Impl::resetFile(FileName const & file)
// signal needs to be disconnected.
sc_.disconnect();
cached_item_.reset();
Cache::get().remove(old_file);
if (status_ != Converting) {
Cache::get().remove(old_file);
} else {
//TODO remove cache item when it is not busy any more
}
}
status_ = cached_item_.get() ? cached_item_->status() : WaitingToLoad;