From f41e5b3b858d549d6a5aaea1684669eb81dd8587 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sun, 30 Jan 2011 08:12:34 +0000 Subject: Guard against controller instances without any inputs. Clean up OS X keyboard key names. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6985 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp') diff --git a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp index 26c2d34474..d1efdf1d93 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp @@ -505,6 +505,9 @@ ControllerInterface::Device::Control* ControllerInterface::InputReference::Detec unsigned int time = 0; bool* const states = new bool[device->Inputs().size()]; + if (device->Inputs().size() == 0) + return NULL; + // get starting state of all inputs, // so we can ignore those that were activated at time of Detect start std::vector::const_iterator -- cgit v1.2.3