[libwnck/wip/muktupavels/lp1990263] handle: avoid segfault in invalidate_icons
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/lp1990263] handle: avoid segfault in invalidate_icons
- Date: Tue, 20 Sep 2022 12:44:29 +0000 (UTC)
commit e43272333bb6fa16811f4591cef9f9f2f158b8a0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Sep 20 15:40:22 2022 +0300
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 e12ff882..8d5da45c 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]