gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Fri Apr 12 19:44:44 EDT 2024


Updated	 via  https://github.com/Gnucash/gnucash/commit/01bffa48 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f0d45de6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8d6f748a (commit)
	from  https://github.com/Gnucash/gnucash/commit/0796a0ef (commit)



commit 01bffa485a2688b90989b57063453a2962c5fc37
Merge: 0796a0ef06 f0d45de642
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Apr 12 16:43:59 2024 -0700

    Merge Sherlock's fix for Bug 799281 into stable.


commit f0d45de642e4691b45a18e4f3919c9b774cd79ae
Author: Sherlock <119709043+agwekixj at users.noreply.github.com>
Date:   Fri Apr 12 15:52:39 2024 -0700

    Resolve test assert.

diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp
index 7d7f727abb..cd23c46365 100644
--- a/libgnucash/engine/qofid.cpp
+++ b/libgnucash/engine/qofid.cpp
@@ -216,7 +216,7 @@ qof_collection_lookup_entity (const QofCollection *col, const GncGUID * guid)
     if (guid == NULL) return NULL;
     ent = static_cast<QofInstance*>(g_hash_table_lookup (col->hash_of_entities,
 							 guid));
-    if (qof_instance_get_destroying(ent)) return NULL;	
+    if (ent != NULL && qof_instance_get_destroying(ent)) return NULL;	
     return ent;
 }
 

commit 8d6f748aca103095e8451a88d1b59ea410bceaf6
Author: Sherlock <119709043+agwekixj at users.noreply.github.com>
Date:   Fri Apr 12 15:34:14 2024 -0700

    Bug 799281 - Deleting a transaction may trigger a crash
    
    Update qof_collection_lookup_entity() to prevent returning instances marked to be destroyed.

diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp
index d48e55f9e7..7d7f727abb 100644
--- a/libgnucash/engine/qofid.cpp
+++ b/libgnucash/engine/qofid.cpp
@@ -216,6 +216,7 @@ qof_collection_lookup_entity (const QofCollection *col, const GncGUID * guid)
     if (guid == NULL) return NULL;
     ent = static_cast<QofInstance*>(g_hash_table_lookup (col->hash_of_entities,
 							 guid));
+    if (qof_instance_get_destroying(ent)) return NULL;	
     return ent;
 }
 



Summary of changes:
 libgnucash/engine/qofid.cpp | 1 +
 1 file changed, 1 insertion(+)



More information about the gnucash-changes mailing list