]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
redraw fix 1.
[lyx.git] / src / buffer.C
index a1563139d1574d091a2480aaa1a1828986fbe039..d51ac5c27a0760728518963cf0c89f1f6e116cd6 100644 (file)
@@ -83,6 +83,8 @@
 #include "frontends/Dialogs.h"
 #include "frontends/Alert.h"
 
+#include "graphics/Previews.h"
+
 #include "support/textutils.h"
 #include "support/filetools.h"
 #include "support/path.h"
@@ -194,6 +196,9 @@ Buffer::~Buffer()
                par = tmppar;
        }
        paragraph = 0;
+
+       // Remove any previewed LaTeX snippets assocoated with this buffer.
+       grfx::Previews::get().removeLoader(this);
 }