From b6fb32535a2bab6fcb6ad6672bec7fe4c7245757 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Mon, 20 Aug 2007 21:25:14 +0000 Subject: [PATCH] Fix crash when a user removes a formula when its preview is being generated. (Another signal/destructor/gcc3 bug) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19666 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/RenderPreview.cpp | 7 +++++++ src/insets/RenderPreview.h | 1 + status.15x | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/insets/RenderPreview.cpp b/src/insets/RenderPreview.cpp index 91c9a5fab7..90bff6acb4 100644 --- a/src/insets/RenderPreview.cpp +++ b/src/insets/RenderPreview.cpp @@ -62,6 +62,13 @@ RenderPreview::RenderPreview(RenderPreview const & other, {} +RenderPreview::~RenderPreview() +{ + if (ploader_connection_.connected()) + ploader_connection_.disconnect(); +} + + auto_ptr RenderPreview::clone(Inset const * inset) const { return auto_ptr(new RenderPreview(*this, inset)); diff --git a/src/insets/RenderPreview.h b/src/insets/RenderPreview.h index e46911bd23..e331ea319b 100644 --- a/src/insets/RenderPreview.h +++ b/src/insets/RenderPreview.h @@ -49,6 +49,7 @@ public: RenderPreview(Inset const *); RenderPreview(RenderPreview const &, Inset const *); + ~RenderPreview(); std::auto_ptr clone(Inset const *) const; /// Compute the size of the object, returned in dim diff --git a/status.15x b/status.15x index 8939527bb1..9e1dc43f0a 100644 --- a/status.15x +++ b/status.15x @@ -70,6 +70,9 @@ What's new - Fix crash when a user removes the underlying figure of a graphic inset that has been copied and pasted (Bug 4108). +- Fix crash when a user removes a formula when its preview is being generated. + (gcc 3 only). + * DOCUMENTATION - Embedded Objects manual: section about longtable alignment added