]> git.lyx.org Git - lyx.git/commitdiff
Do not handle special case where buffer == NULL
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 9 Sep 2024 13:52:01 +0000 (15:52 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 9 Sep 2024 13:52:01 +0000 (15:52 +0200)
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

index a86b9348267999b8b4c4846808ef352366ab1b38..16ac8f9237914afa7bee7a511ff1f4ff5dd6653f 100644 (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) {