mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Fix crash with multiple windows: Disconnect the Dialog::hideSlot signal for a deleted Dialog instance.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18684 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8aa6a50e69
commit
90f2bbe012
@ -71,9 +71,13 @@ Dialogs::Dialogs(LyXView & lyxview)
|
||||
: lyxview_(lyxview), in_show_(false)
|
||||
{
|
||||
// Connect signals
|
||||
hideSignal().connect(boost::bind(&Dialogs::hideSlot, this, _1, _2));
|
||||
connection_ = hideSignal().connect(boost::bind(&Dialogs::hideSlot, this, _1, _2));
|
||||
}
|
||||
|
||||
Dialogs::~Dialogs()
|
||||
{
|
||||
connection_.disconnect();
|
||||
}
|
||||
|
||||
Dialog * Dialogs::find_or_build(string const & name)
|
||||
{
|
||||
|
@ -31,6 +31,8 @@ class Dialogs : boost::noncopyable {
|
||||
public:
|
||||
///
|
||||
Dialogs(LyXView &);
|
||||
///
|
||||
~Dialogs();
|
||||
|
||||
/** Check the status of all visible dialogs and disable or reenable
|
||||
* them as appropriate.
|
||||
@ -116,6 +118,9 @@ private:
|
||||
|
||||
/// flag against a race condition due to multiclicks in Qt frontend, see bug #1119
|
||||
bool in_show_;
|
||||
|
||||
///
|
||||
boost::signals::connection connection_;
|
||||
};
|
||||
|
||||
} // namespace lyx
|
||||
|
Loading…
Reference in New Issue
Block a user