gnucash master: Fix abort in qof_log_check.
John Ralls
jralls at code.gnucash.org
Fri May 15 15:52:26 EDT 2020
Updated via https://github.com/Gnucash/gnucash/commit/a81f1554 (commit)
from https://github.com/Gnucash/gnucash/commit/82832634 (commit)
commit a81f155408e9b6ffd161f54959d5adde57602aea
Author: John Ralls <jralls at ceridwen.us>
Date: Fri May 15 12:52:18 2020 -0700
Fix abort in qof_log_check.
Apparently g_logv doesn't like recursive calls from its log handler.
diff --git a/libgnucash/engine/qoflog.cpp b/libgnucash/engine/qoflog.cpp
index 89cc88a32..d9f87e1e2 100644
--- a/libgnucash/engine/qoflog.cpp
+++ b/libgnucash/engine/qoflog.cpp
@@ -322,22 +322,14 @@ gboolean
qof_log_check(QofLogModule domain, QofLogLevel level)
{
- if (!domain)
- {
- PWARN ("Domain not set");
- return FALSE;
- }
-
- if (!level)
- {
- PWARN("0 is not a valid log level");
- return FALSE;
- }
auto module = get_modules();
// If the level is < the default then no need to look further.
if (level < module->m_level)
return TRUE;
+ if (!domain)
+ return FALSE;
+
auto domain_vec = split_domain(domain);
for (auto part : domain_vec)
Summary of changes:
libgnucash/engine/qoflog.cpp | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
More information about the gnucash-changes
mailing list