gnucash maint: [gnc-plugin-page-register] Disable reverse on blank split

Christopher Lam clam at code.gnucash.org
Thu Jun 3 01:52:05 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/020f9a58 (commit)
	from  https://github.com/Gnucash/gnucash/commit/f5257122 (commit)



commit 020f9a58f4a7cb4ef39956436ac8a3e310b30977
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Jun 3 13:49:17 2021 +0800

    [gnc-plugin-page-register] Disable reverse on blank split

diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c
index a6462b7aa..6ed0f4d84 100644
--- a/gnucash/gnome/gnc-plugin-page-register.c
+++ b/gnucash/gnome/gnc-plugin-page-register.c
@@ -4082,6 +4082,12 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
     split = gnc_split_register_get_current_split (reg);
     account = xaccSplitGetAccount (split);
 
+    if (!account)
+    {
+        LEAVE ("shouldn't try to reverse the blank transaction...");
+        return;
+    }
+
     if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
                                 _("New Transaction Information"), &date))
     {



Summary of changes:
 gnucash/gnome/gnc-plugin-page-register.c | 6 ++++++
 1 file changed, 6 insertions(+)



More information about the gnucash-changes mailing list