PC crash fix if youre using a ps4 controller

My game was crashing 5 to 6 times a day but now it hasnt crashed once so it looks like its fixed for me. I was using inputmapper for my ps4 controller I uninstalled it and got DS4 instead now everything works fine.