From e5463330ef17d6342267c6be9026a52f16ecfe7d Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 15 Oct 2019 06:39:54 -0700 Subject: [PATCH] view: Check for viewData in IsVisible() viewData can be NULL, make sure we verify it before dereferencing. (cherry picked from commit 5b8661f2ab5e7b67dc89bcecb877850f34b0ce03) --- common/view/view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index fe581b3a96..d171690d9d 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -1526,7 +1526,7 @@ bool VIEW::IsVisible( const VIEW_ITEM* aItem ) const { const auto viewData = aItem->viewPrivData(); - return viewData->m_flags & VISIBLE; + return viewData && ( viewData->m_flags & VISIBLE ); }