fix crash

This commit is contained in:
Timothy Stack 2019-05-03 14:17:56 -07:00
parent 06d1098211
commit e8f4020c67
1 changed files with 2 additions and 1 deletions

View File

@ -869,7 +869,8 @@ void view_colors::init_roles(const lnav_theme &lt,
reporter(&fg_str->second, errmsg);
return;
}
if (!rgb_color::from_str(bg_str->second, rgb_bg, errmsg)) {
if (bg_str != lt.lt_vars.end() &&
!rgb_color::from_str(bg_str->second, rgb_bg, errmsg)) {
reporter(&bg_str->second, errmsg);
return;
}