Patch for crash in combination with QMMP

K Staring <[email protected]>
Newsgroups gmane.comp.window-managers.ctwm
Message-ID <[email protected]>
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];
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.