Add a check to please coverity.

Fixes #23496.
This commit is contained in:
Richard Heck 2016-06-12 00:12:03 -04:00
parent 6675601147
commit 7b15ea393f
2 changed files with 7 additions and 2 deletions

View File

@ -2751,9 +2751,13 @@ bool GuiView::closeWorkArea(GuiWorkArea * wa)
bool GuiView::closeBuffer()
{
GuiWorkArea * wa = currentMainWorkArea();
// coverity complained about this
// it seems unnecessary, but perhaps is worth the check
LASSERT(wa, return false);
setCurrentWorkArea(wa);
Buffer & buf = wa->bufferView().buffer();
return wa && closeWorkArea(wa, !buf.parent());
return closeWorkArea(wa, !buf.parent());
}

View File

@ -52,7 +52,8 @@ class InGuiThread : private IntoGuiThreadMover
{
public:
InGuiThread() {}
// please coverity by explicitly initalizing this variable.
InGuiThread() : return_value_(R()) {}
template<class F>
R call(F f)