Fix: Don't crash if we have not yet selected a style.
This commit is contained in:
@@ -94,7 +94,11 @@ void ScreenPrompt::Input( const DeviceInput& DeviceI, const InputEventType type,
|
|||||||
|
|
||||||
if( DeviceI.device==DEVICE_KEYBOARD && type==IET_FIRST_PRESS )
|
if( DeviceI.device==DEVICE_KEYBOARD && type==IET_FIRST_PRESS )
|
||||||
{
|
{
|
||||||
PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller );
|
PlayerNumber pn;
|
||||||
|
if ( GAMESTATE->GetCurrentStyle() == NULL )
|
||||||
|
pn = (PlayerNumber)GameI.controller;
|
||||||
|
else
|
||||||
|
pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller );
|
||||||
switch( DeviceI.button )
|
switch( DeviceI.button )
|
||||||
{
|
{
|
||||||
case KEY_LEFT:
|
case KEY_LEFT:
|
||||||
|
|||||||
Reference in New Issue
Block a user