mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/188735: last_nonfloat: Ensure wp is non-NULL before dereferencing
This commit is contained in:
parent
833a6fcb60
commit
f6d4226f4d
@ -2199,7 +2199,7 @@ bool one_nonfloat(void) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
/// always false for a floating window
|
||||
bool last_nonfloat(win_T *wp) FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
return firstwin == wp && !(wp->w_next && !wp->w_floating);
|
||||
return wp != NULL && firstwin == wp && !(wp->w_next && !wp->w_floating);
|
||||
}
|
||||
|
||||
/// Close the possibly last window in a tab page.
|
||||
|
Loading…
Reference in New Issue
Block a user