- xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8, strlen(config.ipc_socket_path), config.ipc_socket_path);
- xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_CONFIG_PATH, A_UTF8_STRING, 8, strlen(saved_configpath), saved_configpath);
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_SOCKET_PATH, A_UTF8_STRING, 8,
+ (config.ipc_socket_path != NULL ? strlen(config.ipc_socket_path) : 0),
+ config.ipc_socket_path);
+ xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, A_I3_CONFIG_PATH, A_UTF8_STRING, 8,
+ strlen(saved_configpath), saved_configpath);