summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
authorSoren Jorvang <soren.jorvang@gmail.com>2011-01-30 08:12:34 +0000
committerSoren Jorvang <soren.jorvang@gmail.com>2011-01-30 08:12:34 +0000
commitf41e5b3b858d549d6a5aaea1684669eb81dd8587 (patch)
treeb438b8a1a40d2a2e5d6540e9b00d195176652147 /Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
parentaa410c8eea7ca21d74ae43f6185145e7035418fe (diff)
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
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp3
1 files changed, 3 insertions, 0 deletions
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<Device::Input*>::const_iterator