From: Peter Howkins Date: Mon, 2 Jul 2018 19:55:54 +0000 (+0100) Subject: dtwm: Coverity 87236 X-Git-Tag: 2.3.0a~261 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c3aac3cc268bd54cd7fc34b6db762b2b16fc453c;p=oweals%2Fcde.git dtwm: Coverity 87236 --- diff --git a/cde/programs/dtwm/WmFeedback.c b/cde/programs/dtwm/WmFeedback.c index d5d0e2ea..3b8800de 100644 --- a/cde/programs/dtwm/WmFeedback.c +++ b/cde/programs/dtwm/WmFeedback.c @@ -382,7 +382,7 @@ void ShowFeedbackWindow (WmScreenData *pSD, int x, int y, unsigned int width, un * Make the feedback window visible (map it) */ - if (pSD->feedbackWin) + if (pSD && pSD->feedbackWin) { /* Make sure the feedback window doesn't get buried */ XRaiseWindow(DISPLAY, pSD->feedbackWin); @@ -422,13 +422,13 @@ void PaintFeedbackWindow (WmScreenData *pSD) /* * draw beveling */ - if (pSD->fbTop->used > 0) + if (pSD->fbTop && pSD->fbTop->used > 0) { XFillRectangles (DISPLAY, pSD->feedbackWin, pSD->feedbackAppearance.inactiveTopShadowGC, pSD->fbTop->prect, pSD->fbTop->used); } - if (pSD->fbBottom->used > 0) + if (pSD->fbBottom && pSD->fbBottom->used > 0) { XFillRectangles (DISPLAY, pSD->feedbackWin, pSD->feedbackAppearance.inactiveBottomShadowGC,