[gnc-main-window] page->window is not main_window, skip warning

This function gets called for both regular register *and* the embedded
register in the SX template editor. The latter is not a main_window,
and launching the SX editor would lead to warnings.
This commit is contained in:
Christopher Lam 2022-04-19 22:49:26 +08:00
parent 37791b608c
commit efbc12b321

View File

@ -2481,7 +2481,11 @@ main_window_update_page_set_read_only_icon (GncPluginPage *page,
ENTER(" ");
g_return_if_fail(page && page->window && GNC_IS_MAIN_WINDOW(page->window));
g_return_if_fail (page && page->window);
if (!GNC_IS_MAIN_WINDOW (page->window))
return;
window = GNC_MAIN_WINDOW(page->window);
/* Get the notebook tab widget */