Do not handle special case where buffer == NULL

If it is so, we have already crashed in isBranchSelected() above.

(and hopefully, buffer_ is never null these days).

Spotted by Coverity scan.
This commit is contained in:
Jean-Marc Lasgouttes 2024-09-09 15:52:01 +02:00
parent ffde470363
commit 6687b34c07

View File

@ -121,10 +121,6 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const
if (decoration() == InsetDecoration::MINIMALISTIC)
return symb + inv_symb + params_.branch;
if (!buffer_) {
return symb + inv_symb + _("Branch (undefined): ")
+ params_.branch;
}
bool const has_layout =
buffer().params().documentClass().hasInsetLayout(layoutName());
if (has_layout) {