Skip to content

Commit 1492ecd

Browse files
committed
Fix crash in color equalizer.
We setup the tabs using GROUP_SLIDERS(). The signal switch_page is raised calling _channel_tabs_switch_callback. In this callback we are accessing gui_date (g->param_size, etc) but this widget is setup after calling GROUP_SLIDERS() which crashes. Connect to the signal at the end of gui_init() when all widgets are created.
1 parent fb61be6 commit 1492ecd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/iop/colorequal.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3005,8 +3005,6 @@ void gui_init(dt_iop_module_t *self)
30053005
static dt_action_def_t notebook_def = { };
30063006
g->notebook = dt_ui_notebook_new(&notebook_def);
30073007
dt_action_define_iop(self, NULL, N_("page"), GTK_WIDGET(g->notebook), &notebook_def);
3008-
g_signal_connect(G_OBJECT(g->notebook), "switch_page",
3009-
G_CALLBACK(_channel_tabs_switch_callback), self);
30103008

30113009
// graph
30123010
g->area = GTK_DRAWING_AREA
@@ -3193,6 +3191,9 @@ void gui_init(dt_iop_module_t *self)
31933191
g->page_num = active_page;
31943192

31953193
self->widget = GTK_WIDGET(box);
3194+
3195+
g_signal_connect(G_OBJECT(g->notebook), "switch_page",
3196+
G_CALLBACK(_channel_tabs_switch_callback), self);
31963197
}
31973198

31983199
// clang-format off

0 commit comments

Comments
 (0)