Bugfix: Don’t strcmp() if client->name == NULL

This commit is contained in:
Michael Stapelberg 2009-03-09 06:41:04 +01:00
parent 6df039c3b5
commit 65595c61a8
1 changed files with 1 additions and 1 deletions

View File

@ -503,7 +503,7 @@ int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t state,
free(new_name); free(new_name);
/* Check if they are the same and dont update if so */ /* Check if they are the same and dont update if so */
if (new_len == client->name_len && strcmp(client->name, new_name) == 0) { if (new_len == client->name_len && client->name != NULL && strcmp(client->name, new_name) == 0) {
LOG("Name did not change, not updating\n"); LOG("Name did not change, not updating\n");
free(ucs2_name); free(ucs2_name);
return; return;