diff --git a/ControllerPatcher.cpp b/ControllerPatcher.cpp index e68bbf3..eb4695c 100644 --- a/ControllerPatcher.cpp +++ b/ControllerPatcher.cpp @@ -747,6 +747,7 @@ CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::gettingInputAllDevices(Inp } CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::setProControllerDataFromHID(void * data,s32 chan, s32 mode){ + if(data == NULL) return CONTROLLER_PATCHER_ERROR_NULL_POINTER; if(chan < 0 || chan > 3) return CONTROLLER_PATCHER_ERROR_INVALID_CHAN; //if(gControllerMapping.proController[chan].enabled == 0) return CONTROLLER_PATCHER_ERROR_MAPPING_DISABLED; @@ -809,6 +810,7 @@ CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::setProControllerDataFromHI } CONTROLLER_PATCHER_RESULT_OR_ERROR ControllerPatcher::setControllerDataFromHID(VPADData * buffer){ + if(buffer == NULL) return CONTROLLER_PATCHER_ERROR_NULL_POINTER; //if(gControllerMapping.gamepad.enabled == 0) return CONTROLLER_PATCHER_ERROR_MAPPING_DISABLED; s32 hidmask = 0;