Don't special case object ID 1 lookup
authorKristian Høgsberg <krh@bitplanet.net>
Sat, 27 Aug 2011 01:39:33 +0000 (21:39 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Sat, 27 Aug 2011 16:06:11 +0000 (12:06 -0400)
src/wayland-client.c

index ed21f04..de84698 100644 (file)
@@ -410,10 +410,7 @@ handle_event(struct wl_display *display,
        const struct wl_message *message;
 
        wl_connection_copy(display->connection, p, size);
-       if (id == 1)
-               proxy = &display->proxy;
-       else
-               proxy = wl_map_lookup(&display->objects, id);
+       proxy = wl_map_lookup(&display->objects, id);
 
        if (proxy == NULL || proxy->object.implementation == NULL) {
                wl_connection_consume(display->connection, size);