[gnome-latex] Document: add hack to avoid crash on app shutdown
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-latex] Document: add hack to avoid crash on app shutdown
- Date: Thu, 31 May 2018 16:21:50 +0000 (UTC)
commit cfc9a5a7dea998bf7182c676b4d8bb16d2ec4410
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu May 31 18:17:20 2018 +0200
Document: add hack to avoid crash on app shutdown
With valac <= 0.40 the Document objects were anyway also leaked, see:
https://gitlab.gnome.org/GNOME/gnome-latex/issues/35
Maybe the easiest solution is to rewrite everything in C.
Fixes https://gitlab.gnome.org/GNOME/gnome-latex/issues/57
src/document.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/document.vala b/src/document.vala
index 47a962a..c4ef85f 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -34,6 +34,11 @@ public class Document : Tepl.Buffer
public Document ()
{
+ // FIXME properly: horrible hack, keep the Document objects alive, to
+ // avoid a crash on application shutdown:
+ // https://gitlab.gnome.org/GNOME/gnome-latex/issues/57
+ this.ref ();
+
// syntax highlighting: LaTeX by default
var lm = Gtk.SourceLanguageManager.get_default ();
set_language (lm.get_language ("latex"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]