From f4621f28d42dda9fca0590c7a04316f692b2a42b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 6 May 2021 22:09:24 +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 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f0b027ac0067e6b1a945867f61f404538c617c5e Author: Thilo Graf Date: 2021-05-06 (Thu, 06 May 2021) --- 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; }