dtwm: Coverity 87236
authorPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 19:55:54 +0000 (20:55 +0100)
committerPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 19:55:54 +0000 (20:55 +0100)
cde/programs/dtwm/WmFeedback.c

index d5d0e2eae17a0e6d5c25cd3afe9824aa6350ccdd..3b8800de3e481cdf04331c2bfdd100d03b6ad755 100644 (file)
@@ -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,