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:
Tim LaBerge
2013-12-25 14:10:57 -08:00
parent f1aa3665ed
commit 196a7c2aa5
2 changed files with 5 additions and 7 deletions

View File

@@ -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;
}