summaryrefslogtreecommitdiff
path: root/editors/lyx-qt/patches/patch-ab
blob: cc5d8a1b1d890e89f3f0bbc969193e1fb22d12f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-ab,v 1.7 2006/04/18 23:21:18 reed Exp $

--- src/frontends/qt2/lyx_gui.C.orig	2006-04-14 13:33:44.000000000 -0700
+++ src/frontends/qt2/lyx_gui.C	2006-04-14 14:18:59.000000000 -0700
@@ -135,8 +135,22 @@
 
 
 LQApplication::~LQApplication()
-{}
-
+{
+/* revision 1.30.2.11 says:
+ * "Don't unlock QApplication's mutex as it leads to undefined behaviour
+ * (and crashes NetBSD)".
+ *
+ * Really the problem was that checking for locked() on NetBSD
+ * for some unknown reason did not work. It did not crash, but just
+ * core dumped when exiting due to "Destroying locked mutex".
+ *
+ * The "lyx: Error detected by libpthread: Destroying locked mutex."
+ * problem still continues on NetBSD, so re-adding the following:
+ */
+#if defined(__NetBSD__) && defined(QT_THREAD_SUPPORT)
+	unlock();
+#endif
+}
 
 #ifdef Q_WS_MACX
 bool LQApplication::macEventFilter(EventRef event)