summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-03 13:43:33 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2022-06-05 14:58:36 +0200
commit1993ea9c1722672987ba07f96737ffa4b9ba1093 (patch)
tree43c2173839ab1c91e939e73d5848858b6f017c7a
parentad02170a2ad0e2713e61eb880de92c6195c994cd (diff)
downloadskin-nopacity-1993ea9c1722672987ba07f96737ffa4b9ba1093.tar.gz
skin-nopacity-1993ea9c1722672987ba07f96737ffa4b9ba1093.tar.bz2
Fix a possible segfault
-rw-r--r--menuitem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/menuitem.c b/menuitem.c
index 4c1f363..7904563 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -80,7 +80,7 @@ void cNopacityMenuItem::CreatePixmapTextScroller(int totalWidth) {
}
void cNopacityMenuItem::SetAlpha(int alpha) {
- pixmapBackground->SetAlpha(alpha);
+ if (pixmapBackground) pixmapBackground->SetAlpha(alpha);
if (pixmapForeground) pixmapForeground->SetAlpha(alpha);
if (pixmapStatic) pixmapStatic->SetAlpha(alpha);
if (pixmapTextScroller) pixmapTextScroller->SetAlpha(alpha);