[LyX/master] Do not handle special case where buffer == NULL
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Mon Sep 9 13:54:05 UTC 2024
commit 6687b34c072064950ff52efd79439fa4fc03604f
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Mon Sep 9 15:52:01 2024 +0200
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) {
More information about the lyx-cvs
mailing list