{
pepper_touch_point_t *point = get_touch_point(touch, id);
- PEPPER_CHECK(point, return, "Touch point %d does not exist.\n", id);
-
if (focus) {
if (!point)
pepper_touch_add_point(touch, id, 0, 0);
- touch_point_set_focus(get_touch_point(touch, id), focus);
+ point = get_touch_point(touch, id);
+ if (point)
+ touch_point_set_focus(point, focus);
} else {
if (point)
pepper_touch_remove_point(touch, id);
PEPPER_API pepper_bool_t
pepper_view_set_surface(pepper_view_t *view, pepper_surface_t *surface)
{
+ PEPPER_CHECK(view, return PEPPER_FALSE, "invalid parameter.\n");
+
if (view->surface == surface)
return PEPPER_TRUE;