]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlERT.C
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlERT.C
index 20981ce91be28f0c57a0ebc98d473a468afea902..a809f7795e40b506872d1b2961f83c88f16dd1e5 100644 (file)
@@ -6,7 +6,7 @@
  * \author Jürgen Vigna
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 #include "funcrequest.h"
 
 
+using std::string;
+
+namespace lyx {
+namespace frontend {
+
 ControlERT::ControlERT(Dialog & parent)
        : Dialog::Controller(parent), status_(InsetERT::Collapsed)
 {}
@@ -36,5 +41,8 @@ void ControlERT::clearParams()
 void ControlERT::dispatchParams()
 {
        string const lfun = InsetERTMailer::params2string(status_);
-       kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
+       kernel().dispatch(FuncRequest(getLfun(), lfun));
 }
+
+} // namespace frontend
+} // namespace lyx