mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 00:08:19 +00:00
coverity/188735: last_nonfloat: Ensure wp is non-NULL before dereferencing
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user