Index: ppapi/thunk/ppb_gamepad_thunk.cc |
diff --git a/ppapi/thunk/ppb_gamepad_thunk.cc b/ppapi/thunk/ppb_gamepad_thunk.cc |
index 3aeedb57dea12d116e6b0f112e98327f5ff1510b..de2c8be04cf54f30dcd3ed82d82087d23f3e0abf 100644 |
--- a/ppapi/thunk/ppb_gamepad_thunk.cc |
+++ b/ppapi/thunk/ppb_gamepad_thunk.cc |
@@ -17,13 +17,10 @@ namespace thunk { |
namespace { |
void SampleGamepads(PP_Instance instance, PP_GamepadsSampleData* data) { |
- EnterInstance enter(instance); |
+ EnterInstanceAPI<PPB_Gamepad_API> enter(instance); |
if (enter.succeeded()) { |
- PPB_Gamepad_API* api = enter.functions()->GetGamepadAPI(instance); |
- if (api) { |
- api->Sample(data); |
- return; |
- } |
+ enter.functions()->Sample(data); |
+ return; |
} |
// Failure, zero out. |
memset(data, 0, sizeof(PP_GamepadsSampleData)); |