From 3d4cc63d733b2fe3c307953fd80a87595ba08d64 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 5 Oct 2019 16:03:52 +0200 Subject: [PATCH] bindings - ensure engine is initialized before any scm code interfaces with it This is done by invoking gnc_engine_init in the swig initialization routine --- bindings/engine.i | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bindings/engine.i b/bindings/engine.i index caa5a9c800..c19f46c68a 100644 --- a/bindings/engine.i +++ b/bindings/engine.i @@ -286,6 +286,7 @@ void qof_book_set_string_option(QofBook* book, const char* opt_name, const char* %init { { char tmp[100]; + char * no_args[1] = { NULL }; #define SET_ENUM(e) snprintf(tmp, 100, "(set! %s (%s))", (e), (e)); \ scm_c_eval_string(tmp); @@ -433,6 +434,8 @@ void qof_book_set_string_option(QofBook* book, const char* opt_name, const char* #undef SET_ENUM + + gnc_engine_init(0, no_args); } }