fix uninitialized prev/next client pointer
This commit is contained in:
parent
eccc29c455
commit
491a72d8b6
5
client.c
5
client.c
@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "client.h"
|
||||
#include "wm.h"
|
||||
|
||||
// TODO
|
||||
XWindowChanges wm_client_to_xwchanges(Client c)
|
||||
@ -48,6 +49,7 @@ Client* wm_client_find(Wm *wm, Window w)
|
||||
|
||||
Client* wm_client_create(Wm *wm, Window w)
|
||||
{
|
||||
DEBUG_PRINT("%s\n", __func__);
|
||||
Client *t;
|
||||
XTextProperty xtp;
|
||||
int strln;
|
||||
@ -56,6 +58,8 @@ Client* wm_client_create(Wm *wm, Window w)
|
||||
|
||||
Client *c = malloc(sizeof(Client));
|
||||
|
||||
c->next = NULL;
|
||||
c->prev = NULL;
|
||||
c->window = w;
|
||||
c->m = wm->smon;
|
||||
c->ws = wm->smon->selws;
|
||||
@ -71,7 +75,6 @@ Client* wm_client_create(Wm *wm, Window w)
|
||||
|
||||
if (wm->smon->clients == NULL) {
|
||||
wm->smon->clients = c;
|
||||
c->prev = NULL;
|
||||
} else {
|
||||
t = wm_get_last_client(wm, *c->m);
|
||||
//c = &root;
|
||||
|
Loading…
x
Reference in New Issue
Block a user