Commit dc7fa360 authored by Andrea Azzarone's avatar Andrea Azzarone 🚴
Browse files

panel-loader: Skip static init func if the panel has not been added

For several reasons a panel cannot be added to the model (e.g. if
OnlyShowIn/NotShowIn is set to skip the panel on a particular desktop). If this
is the case we should avoid calling the panel's static init func (if any).

Fixes: GNOME/gnome-control-center#248
parent c9fc833d
Pipeline #37265 passed with stages
in 4 minutes and 25 seconds
......@@ -210,7 +210,7 @@ cc_panel_loader_fill_model (CcShellModel *model)
for (i = 0; i < G_N_ELEMENTS (all_panels); i++)
if (all_panels[i].static_init_func)
if (cc_shell_model_has_panel (model, all_panels[i].name) && all_panels[i].static_init_func)
all_panels[i].static_init_func ();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment