~mhall119/+junk/geany-keywords

« back to all changes in this revision

Viewing changes to debian/patches/40_fix_crashes_and_mem_corrup_at_exit.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Jérôme Guelfucci
  • Date: 2009-04-15 07:53:50 UTC
  • Revision ID: james.westby@ubuntu.com-20090415075350-6p4moxn6ch1sa281
Tags: 0.16-0ubuntu4
debian/patches: add 40_fix_crashes_and_mem_corrup_at_exit.dpatch to
fix a lot of crashes and memory corruption at exit. This patch is
from upstream SVN r3656 and upstream strongly suggested to get it
in. (LP: #361537)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 40_fix_crashes_and_mem_corrup_at_exit.dpatch from upstream SVN r3656
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Fixes a lot of crashes and memory corruptions when exiting the application.
 
6
 
 
7
@DPATCH@
 
8
--- trunk/src/keybindings.c     2009/03/26 20:17:16     3655
 
9
+++ trunk/src/keybindings.c     2009/03/26 20:31:55     3656
 
10
@@ -48,6 +48,7 @@
 
11
 #include "toolbar.h"
 
12
 #include "treeviews.h"
 
13
 #include "geanywraplabel.h"
 
14
+#include "main.h"
 
15
 
 
16
 
 
17
 GPtrArray *keybinding_groups;  /* array of GeanyKeyGroup pointers */
 
18
@@ -525,8 +526,11 @@
 
19
 
 
20
 static void on_document_close(GObject *obj, GeanyDocument *doc)
 
21
 {
 
22
-       g_queue_remove_all(mru_docs, doc);
 
23
-       g_idle_add(on_idle_close, NULL);
 
24
+       if (! main_status.quitting)
 
25
+       {
 
26
+               g_queue_remove_all(mru_docs, doc);
 
27
+               g_idle_add(on_idle_close, NULL);
 
28
+       }
 
29
 }