Skip to content

Commit

Permalink
Bug 799458 - Crash attempting to edit a scheduled transaction
Browse files Browse the repository at this point in the history
Caused by arbitrarily casting a random GtkBox to GncMainWindow. Get
the GtkBox's parent main window instead.
  • Loading branch information
jralls committed Dec 12, 2024
1 parent 77a95b2 commit 3fcb45e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gnucash/gnome-utils/gnc-plugin-page.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "gnc-plugin.h"
#include "gnc-plugin-page.h"
#include "gnc-gobject-utils.h"
#include "gnc-ui.h"

/** The debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
Expand Down Expand Up @@ -891,7 +892,7 @@ gnc_plugin_page_inserted_cb (GncPluginPage *page, gpointer user_data)
page);

// on initial load try and set the page focus
if (!gnc_main_window_is_restoring_pages (GNC_MAIN_WINDOW(page->window)))
if (!gnc_main_window_is_restoring_pages (GNC_MAIN_WINDOW (gnc_ui_get_main_window (page->window))))
(GNC_PLUGIN_PAGE_GET_CLASS(page)->focus_page)(page, TRUE);
}

Expand Down

0 comments on commit 3fcb45e

Please sign in to comment.