Alopex

Check-in [db92b46d48]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initialize Client *b to NULL Issuing a focus up command when at the top of the client list caused a crash due to Client *b not being initialized
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256:db92b46d484ecb697b6d6e01828edffeb06a0837e763da23bba8c1a93011332d
User & Date: patrick.fernie@gmail.com 2014-06-22 20:18:27
Context
2014-06-22
22:08
Merge pull request #50 from pfernie/focus_up Initialize Client *b to NULL check-in: e3c8a65315 user: jesse@mccluresk9.com tags: trunk, master
20:18
Initialize Client *b to NULL Issuing a focus up command when at the top of the client list caused a crash due to Client *b not being initialized check-in: db92b46d48 user: patrick.fernie@gmail.com tags: trunk, master
2014-06-16
20:50
minor cleanup check-in: 7bad7d1bf9 user: jesse@mccluresk9.com tags: trunk, master
Changes

Changes to src/actions.c.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
void focus(Client *t, const char **arg) {
	if (t) {
		winmarks[0] = winmarks[1];
		winmarks[1] = t;
		return;
	}
	Container *C;
	Client *c, *a, *b;
	if (!(c=winmarks[1])) return;
	if (strncasecmp(arg[0],"flo",3)==0) { /* focus floating */
		for (a = winmarks[1]->next; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) for (a = clients; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) return;







|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
void focus(Client *t, const char **arg) {
	if (t) {
		winmarks[0] = winmarks[1];
		winmarks[1] = t;
		return;
	}
	Container *C;
	Client *c, *a, *b = NULL;
	if (!(c=winmarks[1])) return;
	if (strncasecmp(arg[0],"flo",3)==0) { /* focus floating */
		for (a = winmarks[1]->next; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) for (a = clients; a; a = a->next)
			if (a->flags & WIN_FLOAT) break;
		if (!a) return;