summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 181d7299..a79cc014 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,6 +1,12 @@
#include "MultiMC.h"
#include "gui/MainWindow.h"
+// Crash handling
+#ifdef HANDLE_SEGV
+#include <HandleCrash.h>
+#endif
+
+
int main_gui(MultiMC &app)
{
// show main window
@@ -23,6 +29,11 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(multimc);
Q_INIT_RESOURCE(backgrounds);
+#ifdef HANDLE_SEGV
+ // Register signal handler for generating crash reports.
+ initBlackMagic();
+#endif
+
switch (app.status())
{
case MultiMC::Initialized: