Hi,

When starting QMMP (I'm on FreeBSD), ctwm crashes in ewmh.c . It appears that
vs->wsw->currentwspc isn't occupied as expected. The following patch
fixes the crash.


Regards,

Kbamba Staring

--- ewmh.c.orig 2020-02-04 21:40:29.243485000 +0100
+++ ewmh.c      2020-02-04 21:40:03.665689000 +0100
@@ -1636,7 +1636,8 @@
 
        /* Remove from visible workspace */
        if((vs = twm_win->vs) != NULL) {
-               occupation &= ~(1 << vs->wsw->currentwspc->number);
+               if (vs->wsw && vs->wsw->currentwspc)
+                       occupation &= ~(1 << vs->wsw->currentwspc->number);
        }
 
        val = (unsigned int)msg->data.l[0];

Reply via email to