mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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:
parent
ffde470363
commit
6687b34c07
@ -121,10 +121,6 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const
|
|||||||
if (decoration() == InsetDecoration::MINIMALISTIC)
|
if (decoration() == InsetDecoration::MINIMALISTIC)
|
||||||
return symb + inv_symb + params_.branch;
|
return symb + inv_symb + params_.branch;
|
||||||
|
|
||||||
if (!buffer_) {
|
|
||||||
return symb + inv_symb + _("Branch (undefined): ")
|
|
||||||
+ params_.branch;
|
|
||||||
}
|
|
||||||
bool const has_layout =
|
bool const has_layout =
|
||||||
buffer().params().documentClass().hasInsetLayout(layoutName());
|
buffer().params().documentClass().hasInsetLayout(layoutName());
|
||||||
if (has_layout) {
|
if (has_layout) {
|
||||||
|
Loading…
Reference in New Issue
Block a user