Fix another optional access usage.

This commit is contained in:
2025-04-26 03:22:44 -04:00
parent 512e3fbcfd
commit cbb099700b

View File

@ -890,7 +890,7 @@ void Html_tag_open_option(DilloHtml *html, const char *tag, int tagsize)
bool enabled = (a_Html_get_attr(html, tag, tagsize, "disabled") == NULL);
DilloHtmlOption *option =
new DilloHtmlOption (dStrdup( value.value().c_str() ), dStrdup( label.value().c_str() ), selected, enabled);
new DilloHtmlOption (value ? dStrdup( value.value().c_str() ) : nullptr, label ? dStrdup( label.value().c_str() ) : nullptr, selected, enabled);
input->select->addOpt(option);
}