Protect strncmp from empty string. It crashes if given one.

pull/1191/head
John Ralls 5 years ago
parent a2e1a3e1b8
commit 58d090ff32

@ -454,7 +454,7 @@ gnc_options_dialog_append_page(GNCOptionWin * propertybox,
GncOptionSectionPtr& section)
{
auto name = section->get_name().c_str();
if (!name)
if (!name || *name == '\0')
return -1;
if (strncmp(name, "__", 2) == 0)

Loading…
Cancel
Save