Skip to content


Browse files Browse the repository at this point in the history
cpufreq: stop segfault with gtk3.23
Also stop any other segfaults caused by failure of deprecated gtk_action_group_get_action to return the name of the active item. With GTK 3.23.0 cpufreq_popup_menu_set_active sends invalid name information for userspace governors
  • Loading branch information
lukefromdc committed Jul 12, 2018
1 parent 6f4843f commit 881233e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cpufreq/src/cpufreq-popup.c
Expand Up @@ -437,7 +437,16 @@ cpufreq_popup_menu_set_active_action (CPUFreqPopup *popup,

g_snprintf (name, sizeof (name), "%s%s", prefix, item);
action = gtk_action_group_get_action (action_group, name);

/* gtk_action_group_get_action can return NULL with frequencies (userspace governor)
* when the CPU does not actually stay locked to that exact frequency but rather to a
* frequency range. Since cpufreq_monitor_get_frequency gets the realtime frequency, this
* may not match any named frequency and then returns NULL. Return when this happens to
* avoid segfaults
if (action == NULL)

g_signal_handlers_block_by_func (action,
Expand Down

0 comments on commit 881233e

Please sign in to comment.