fix use of uninitialised warning on older gcc

This commit is contained in:
Vincent Sanders 2020-05-23 23:48:08 +01:00
parent fe429e8d2d
commit dbe63210cf

View File

@ -1592,10 +1592,12 @@ textplain_textselection_copy(struct content *c,
{
const char *text;
size_t length;
bool res;
bool res = false;
text = textplain_get_raw_data(c, start_idx, end_idx, &length);
res = selection_string_append(text, length, false, NULL, selstr);
if (text != NULL) {
res = selection_string_append(text, length, false, NULL, selstr);
}
if (res == false) {
return NSERROR_NOMEM;
}