From f72ca5887a2a2538b5507c97be10d829c28bcc5b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 3 May 2021 17:18:54 +0200 Subject: [PATCH] rate_banner.cpp: try to fix possible crash if pixbuf = NULL RestoreScreen() expects no null pointer passed as argument 5, is passed to memmove --- src/gui/rate_banner.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/rate_banner.cpp b/src/gui/rate_banner.cpp index b7461ef62..75cbcc9b5 100644 --- a/src/gui/rate_banner.cpp +++ b/src/gui/rate_banner.cpp @@ -80,7 +80,8 @@ void CRateBanner::paint(const bool &do_save_bg) addIcons(rat_icon_bg, rat_max); paintCCItems(); - frameBuffer->RestoreScreen(x_base, y, w_tmp, height, pixbuf); + if (pixbuf) + frameBuffer->RestoreScreen(x_base, y, w_tmp, height, pixbuf); delete[] pixbuf; pixbuf = NULL; }