From 0fd68dad6247769edf21a5970af266671c1c0cdc Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 11 Jan 2020 00:09:08 +0000 Subject: [PATCH] Fix freed pointer access issue (from Coverity scan). --- common/page_layout/ws_data_item.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/page_layout/ws_data_item.cpp b/common/page_layout/ws_data_item.cpp index 16f3cf29eb..4c2359bc38 100644 --- a/common/page_layout/ws_data_item.cpp +++ b/common/page_layout/ws_data_item.cpp @@ -108,6 +108,11 @@ void WS_DATA_ITEM::SyncDrawItems( WS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aV item = new WS_DRAW_ITEM_LINE( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize ); else if( m_type == WS_RECT ) item = new WS_DRAW_ITEM_RECT( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize ); + else + { + wxFAIL_MSG( "Unknown worksheet draw item type" ); + continue; + } item->SetFlags( itemFlags[ j ] ); m_drawItems.push_back( item );