gnucash maint: Bug 798063 - Crash when opening SX Editor

John Ralls jralls at code.gnucash.org
Mon Dec 28 15:15:43 EST 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/6cb58394 (commit)
	from  https://github.com/Gnucash/gnucash/commit/60aededa (commit)



commit 6cb58394cd639bd21cdb9bf49c1df4f7c94e5b1a
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Dec 28 12:08:57 2020 -0800

    Bug 798063 - Crash when opening SX Editor
    
    Scheduled transactions place register pages in embedded windows
    and their priv struct is different so treating one as a main window
    crashes. Besides, the register in the SX editor would never be
    read-only. Make sure we have a GncMainWindow at the beginning of
    main_window_update_page_set_read_only_icon.

diff --git a/gnucash/gnome-utils/gnc-main-window.c b/gnucash/gnome-utils/gnc-main-window.c
index 864808f4a..9f962e3b6 100644
--- a/gnucash/gnome-utils/gnc-main-window.c
+++ b/gnucash/gnome-utils/gnc-main-window.c
@@ -2456,6 +2456,7 @@ main_window_update_page_set_read_only_icon (GncPluginPage *page,
 
     ENTER(" ");
 
+    g_return_if_fail(page && page->window && GNC_IS_MAIN_WINDOW(page->window));
     window = GNC_MAIN_WINDOW(page->window);
 
     /* Get the notebook tab widget */



Summary of changes:
 gnucash/gnome-utils/gnc-main-window.c | 1 +
 1 file changed, 1 insertion(+)



More information about the gnucash-changes mailing list