From 6687b34c072064950ff52efd79439fa4fc03604f Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 9 Sep 2024 15:52:01 +0200 Subject: [PATCH] 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. --- src/insets/InsetBranch.cpp | 4 ---- 1 file changed, 4 deletions(-) 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) { -- 2.39.5