From: Peter Howkins Date: Fri, 13 Jul 2018 17:54:01 +0000 (+0100) Subject: dtcm: Coverity 87745 and 88154 X-Git-Tag: 2.3.0a~77 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4be7b85e019cbece8d3621a304cc94503b931a3f;p=oweals%2Fcde.git dtcm: Coverity 87745 and 88154 --- diff --git a/cde/programs/dtcm/dtcm/browser.c b/cde/programs/dtcm/dtcm/browser.c index f0b60186..bd0193af 100644 --- a/cde/programs/dtcm/dtcm/browser.c +++ b/cde/programs/dtcm/dtcm/browser.c @@ -145,13 +145,13 @@ br_display(Calendar *c) { for (i = 0; i < pos_cnt; i++) { bd = (BlistData *)CmDataListGetData(bl->blist_data, pos_list[i]); + if (bd) { + destroy_paint_cache(bd->cache, bd->cache_size); + bd->cache = NULL; + bd->cache_size = 0; - destroy_paint_cache(bd->cache, bd->cache_size); - bd->cache = NULL; - bd->cache_size = 0; - - if (bd) mb_update_array(bd->name, c); + } } if (pos_list) XtFree((XtPointer)pos_list);