]> git.lyx.org Git - lyx.git/blobdiff - src/factory.cpp
Fix bug 4463. The crash was due to a call to X from inside a child process.
[lyx.git] / src / factory.cpp
index 7eeaa238043bc26300331896390785d24662b5aa..d3b29e2f22e83b14c083c2ad8114e0101a49f5e6 100644 (file)
@@ -68,6 +68,7 @@
 #include <sstream>
 
 using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
@@ -358,12 +359,12 @@ Inset * createInset(Buffer & buf, FuncRequest const & cmd)
                        break;
                }
 
-       } catch (support::ExceptionMessage const & message) {
-               if (message.type_ == support::ErrorException) {
+       } catch (ExceptionMessage const & message) {
+               if (message.type_ == ErrorException) {
+                       // This should never happen!
                        Alert::error(message.title_, message.details_);
-                       LyX::cref().emergencyCleanup();
-                       abort();
-               } else if (message.type_ == support::WarningException) {
+                       LyX::cref().exit(1);
+               } else if (message.type_ == WarningException) {
                        Alert::warning(message.title_, message.details_);
                        return 0;
                }