Skip to content

Commit

Permalink
gui: Utilize getter for LeptonPage's 'toplevel' field in x_event_conf…
Browse files Browse the repository at this point in the history
…igure()
  • Loading branch information
vzh committed May 23, 2024
1 parent d99b4fc commit bfebd2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libleptongui/src/x_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ x_event_configure (GschemPageView *page_view,
return FALSE;
}

g_return_val_if_fail (p_current->toplevel != NULL, FALSE);
LeptonToplevel *toplevel = lepton_page_get_toplevel (p_current);
g_return_val_if_fail (toplevel != NULL, FALSE);

gtk_widget_get_allocation (GTK_WIDGET(page_view), &current_allocation);

Expand Down Expand Up @@ -263,7 +264,7 @@ x_event_configure (GschemPageView *page_view,


/* re-pan each page of the LeptonToplevel */
for ( iter = lepton_list_get_glist (p_current->toplevel->pages);
for ( iter = lepton_list_get_glist (toplevel->pages);
iter != NULL;
iter = g_list_next (iter) ) {

Expand Down

0 comments on commit bfebd2e

Please sign in to comment.