summaryrefslogtreecommitdiff
path: root/finance
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2001-01-09 13:08:26 +0000
committerwiz <wiz@pkgsrc.org>2001-01-09 13:08:26 +0000
commitcc659bea2225307b67d1d3707005d1c5810af494 (patch)
tree50087d6076ddb5a174075f6446b5a1363409a24c /finance
parent860cfd39b1fc13f1770bc3580132521fd3cd1a97 (diff)
downloadpkgsrc-cc659bea2225307b67d1d3707005d1c5810af494.tar.gz
Fix core dump in QIF import dialog. Patch provided by author.
Diffstat (limited to 'finance')
-rw-r--r--finance/gnucash/files/patch-sum3
-rw-r--r--finance/gnucash/patches/patch-ae76
2 files changed, 78 insertions, 1 deletions
diff --git a/finance/gnucash/files/patch-sum b/finance/gnucash/files/patch-sum
index c244d0a9c6e..9c4006ea5ac 100644
--- a/finance/gnucash/files/patch-sum
+++ b/finance/gnucash/files/patch-sum
@@ -1,6 +1,7 @@
-$NetBSD: patch-sum,v 1.1.1.1 2000/12/11 13:53:26 wiz Exp $
+$NetBSD: patch-sum,v 1.2 2001/01/09 13:08:26 wiz Exp $
MD5 (patch-aa) = 5d1dabddbddaf6458bbf170980d7a08b
MD5 (patch-ac) = ac5cd850f1f2e74361c5f20f4db094a2
MD5 (patch-ad) = 6da4ba43f2b1d70a56fc49a09a204844
+MD5 (patch-ae) = 9efecdaf3f11d919d57926779ac3c31b
MD5 (patch-ag) = bae4faae6984604a460d97413fde8b6b
diff --git a/finance/gnucash/patches/patch-ae b/finance/gnucash/patches/patch-ae
new file mode 100644
index 00000000000..3965659f80f
--- /dev/null
+++ b/finance/gnucash/patches/patch-ae
@@ -0,0 +1,76 @@
+$NetBSD: patch-ae,v 1.1 2001/01/09 13:08:26 wiz Exp $
+
+--- src/gnome/dialog-qif-import.c.orig Sat Sep 23 10:33:33 2000
++++ src/gnome/dialog-qif-import.c
+@@ -96,11 +96,14 @@
+ int scm_strlen;
+
+ retval = g_new0(QIFImportWindow, 1);
+-
++
+ retval->dialog = create_QIF_File_Import_Dialog();
+- retval->imported_files =
+- SCM_EOL;
+- retval->selected_file = SCM_BOOL_F;
++
++ retval->imported_files = SCM_UNDEFINED;
++ retval->selected_file = SCM_UNDEFINED;
++ retval->mapping_info = SCM_UNDEFINED;
++ retval->cat_display_info = SCM_UNDEFINED;
++ retval->acct_display_info = SCM_UNDEFINED;
+
+ retval->currency_entry =
+ gtk_object_get_data(GTK_OBJECT(retval->dialog), "qif_currency_entry");
+@@ -117,7 +120,6 @@
+ gtk_object_get_data(GTK_OBJECT(retval->dialog), "account_page_list");
+ retval->cat_list =
+ gtk_object_get_data(GTK_OBJECT(retval->dialog), "category_page_list");
+-
+
+ gtk_object_set_data(GTK_OBJECT(retval->dialog),
+ "qif_window_struct", retval);
+@@ -130,14 +132,15 @@
+
+ mapping_info = gh_call0(load_map_prefs);
+ retval->mapping_info = mapping_info;
+-
++ scm_protect_object(retval->mapping_info);
++
+ default_currency = gh_call1(lookup_value,
+ gh_call2(lookup_option,
+ gh_str02scm("International"),
+ gh_str02scm("Default Currency")));
+-
++
++ retval->imported_files = SCM_EOL;
+ scm_protect_object(retval->imported_files);
+- scm_protect_object(retval->mapping_info);
+
+ /* set the currency entry to the GNC default currency */
+ gtk_entry_set_text(GTK_ENTRY(retval->currency_entry),
+@@ -161,11 +164,20 @@
+ gnome_dialog_close(GNOME_DIALOG(window->dialog));
+ }
+
+- scm_unprotect_object(window->imported_files);
+- scm_unprotect_object(window->selected_file);
+- scm_unprotect_object(window->mapping_info);
+- scm_unprotect_object(window->cat_display_info);
+- scm_unprotect_object(window->acct_display_info);
++ if (window->imported_files != SCM_UNDEFINED)
++ scm_unprotect_object(window->imported_files);
++
++ if (window->selected_file != SCM_UNDEFINED)
++ scm_unprotect_object(window->selected_file);
++
++ if (window->mapping_info != SCM_UNDEFINED)
++ scm_unprotect_object(window->mapping_info);
++
++ if (window->cat_display_info != SCM_UNDEFINED)
++ scm_unprotect_object(window->cat_display_info);
++
++ if (window->acct_display_info != SCM_UNDEFINED)
++ scm_unprotect_object(window->acct_display_info);
+
+ g_free(window);
+ }