Fine tune debugging.
1) If get_modifier() fails, set the label to "Unknown pos/id". Thus, label will always be non-null and debugging should be easier. The minor downside is that the label string is leaked when we update the modifier group. 2) Restore the assert in update_modifier_vbox() and the now unnecessary test of group[x].label.
This commit is contained in:
@@ -4614,7 +4614,8 @@ void update_modifier_linkable_list(GString *msg)
|
||||
group[i].settings = get_modifier_settings(modifier->values);
|
||||
group[i].settings_amt = 2;
|
||||
} else {
|
||||
group[i].label = "Unknown";
|
||||
// The string is leaked when the modifier list is updated.
|
||||
group[i].label = g_strdup_printf("Unknown pos %d id %d", position, id);
|
||||
group[i].settings = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user