libwnck: avoid segfault in invalidate_icons
This commit is contained in:
parent
da73d4db71
commit
a3cb8c7bfc
@ -0,0 +1,27 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= <alberts.muktupavels@gmail.com>
|
||||||
|
Date: Tue, 20 Sep 2022 15:40:22 +0300
|
||||||
|
Subject: [PATCH] handle: avoid segfault in invalidate_icons
|
||||||
|
|
||||||
|
Screens variable won't be initialized if default icon sizes are
|
||||||
|
set/changed before using wnck_screen_get_default.
|
||||||
|
|
||||||
|
https://bugs.launchpad.net/ubuntu/+source/libwnck3/+bug/1990263
|
||||||
|
---
|
||||||
|
libwnck/wnck-handle.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libwnck/wnck-handle.c b/libwnck/wnck-handle.c
|
||||||
|
index e12ff8825045..8d5da45c8787 100644
|
||||||
|
--- a/libwnck/wnck-handle.c
|
||||||
|
+++ b/libwnck/wnck-handle.c
|
||||||
|
@@ -70,6 +70,9 @@ invalidate_icons (WnckHandle *self)
|
||||||
|
Display *xdisplay;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
+ if (self->screens == NULL)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
xdisplay = _wnck_get_default_display ();
|
||||||
|
|
||||||
|
for (i = 0; i < ScreenCount (xdisplay); ++i)
|
@ -1,7 +1,7 @@
|
|||||||
# Template file for 'libwnck'
|
# Template file for 'libwnck'
|
||||||
pkgname=libwnck
|
pkgname=libwnck
|
||||||
version=43.0
|
version=43.0
|
||||||
revision=1
|
revision=2
|
||||||
build_style=meson
|
build_style=meson
|
||||||
build_helper="gir"
|
build_helper="gir"
|
||||||
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)"
|
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user