From c3aac3cc268bd54cd7fc34b6db762b2b16fc453c Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 2 Jul 2018 20:55:54 +0100 Subject: [PATCH] dtwm: Coverity 87236 --- cde/programs/dtwm/WmFeedback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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, -- 2.25.1