message: common: text: Do not return nullptr syntax tree
diff: @@ -194,6 +194,13 @@ void TextStructureView::FocusOnSubtreeSpanningSubstring(int left_offset,
  VLOG(2) << __FUNCTION__ << " at " << left_offset << " +" << length;
  const int right_offset = left_offset + length;
  TrimSyntaxTree(left_offset, right_offset);
  +
  + // Don't let the syntax tree be empty.
  + // Always return a tree with one node.
  + // This can happen when TrimSyntaxTree() yields a nullptr syntax tree
  + if (syntax_tree_ == nullptr) {
  + syntax_tree_ = MakeNode();
  + }
  TrimTokensToSubstring(left_offset, right_offset);
  TrimContents(left_offset, length);
  lazy_lines_info_.valid = false;
  