diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index 1bcac4dd0f..674c3ec6c4 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -46,11 +46,11 @@ string current_layout; LyXView::LyXView() - : controlcommand_(new ControlCommandBuffer(getLyXFunc())), - intl_(new Intl), + : intl_(new Intl), autosave_timeout_(new Timeout(5000)), lyxfunc_(new LyXFunc(this)), - dialogs_(new Dialogs(this)) + dialogs_(new Dialogs(this)), + controlcommand_(new ControlCommandBuffer(getLyXFunc())) { lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl; } diff --git a/src/frontends/LyXView.h b/src/frontends/LyXView.h index 5a478650a9..2e2e431a21 100644 --- a/src/frontends/LyXView.h +++ b/src/frontends/LyXView.h @@ -144,8 +144,6 @@ protected: boost::scoped_ptr menubar_; /// view's toolbar boost::scoped_ptr toolbar_; - /// view's command buffer controller - boost::scoped_ptr const controlcommand_; private: /** @@ -166,6 +164,12 @@ private: boost::scoped_ptr lyxfunc_; /// dialogs for this view boost::scoped_ptr dialogs_; + +protected: + /// view's command buffer controller + // this has to be declared _after_ lyxfunc_ as its initialization depends + // on it! + boost::scoped_ptr const controlcommand_; }; #endif // LYXVIEW_H