From: Jean-Marc Lasgouttes Date: Mon, 9 Sep 2024 13:52:01 +0000 (+0200) Subject: Do not handle special case where buffer == NULL X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6687b34c072064950ff52efd79439fa4fc03604f;p=lyx.git 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. --- diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index a86b934826..16ac8f9237 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -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) {