From 58a08a01251f9d904439cfb2b8325dc599f51f40 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sat, 11 Jul 2020 12:48:46 +0800 Subject: [PATCH] typo fix edd7efd95 book->!book bail out --- gnucash/gnome/gnc-plugin-page-register.c | 2 +- gnucash/gnome/gnc-plugin-page-register2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnucash/gnome/gnc-plugin-page-register.c b/gnucash/gnome/gnc-plugin-page-register.c index c7ab6d0b28..6f6d6137ea 100644 --- a/gnucash/gnome/gnc-plugin-page-register.c +++ b/gnucash/gnome/gnc-plugin-page-register.c @@ -1816,7 +1816,7 @@ gnc_plugin_page_register_recreate_page (GtkWidget* window, include_subs = (g_ascii_strcasecmp (reg_type, LABEL_SUBACCOUNT) == 0); DEBUG ("Include subs: %d", include_subs); book = qof_session_get_book (gnc_get_current_session()); - if (book) + if (!book) { LEAVE("Session has no book"); return NULL; diff --git a/gnucash/gnome/gnc-plugin-page-register2.c b/gnucash/gnome/gnc-plugin-page-register2.c index 1e8368c474..7bd409dcca 100644 --- a/gnucash/gnome/gnc-plugin-page-register2.c +++ b/gnucash/gnome/gnc-plugin-page-register2.c @@ -1495,7 +1495,7 @@ gnc_plugin_page_register2_recreate_page (GtkWidget *window, acct_name = g_key_file_get_string (key_file, group_name, KEY_ACCOUNT_NAME, &error); book = qof_session_get_book (gnc_get_current_session()); - if (book) + if (!book) { LEAVE("Session has no book"); return NULL;