]> git.lyx.org Git - features.git/commit
Fix bug #7263: Instant Preview crash.
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 15 Feb 2011 17:11:03 +0000 (17:11 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 15 Feb 2011 17:11:03 +0000 (17:11 +0000)
commitd77fc1668c0300637e129216834d1b30ccdd228b
treeaf5be0df6445d098aa456a6b4d1a9d987b6f4091
parent66ca99798bff016b0a60cb10bd2124c5c228c8b6
Fix bug #7263: Instant Preview crash.

I guess this deserves to be sorted out better, because we are doing tricky things by deleted the object from itself.

Problem:

PreviewImage? has a member PreviewLoader?. PreviewImage::Impl::statusChanged() calls PreviewLoader::remove. PreviewLoader::Impl::remove removes a snippet from the cache. In the cache is a map of the snippet and a shared pointer to PreviewImage?. This means that removing the snippet from the cache, destroys the PreviewImage?. When we get back to PreviewImage::Impl::statusChanged() this will start to crash.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37681 a592a061-630c-0410-9148-cb99ea01b6c8
src/graphics/PreviewImage.cpp