fix AV if lose focus while initializing

This commit is contained in:
Chris Danford
2005-09-22 18:18:04 +00:00
parent a19f0b492a
commit 30c23a8129
+10 -5
View File
@@ -324,12 +324,17 @@ static bool ChangeAppPri()
{
vector<InputDevice> vDevices;
vector<CString> vDescriptions;
INPUTMAN->GetDevicesAndDescriptions(vDevices,vDescriptions);
CString sInputDevices = join( ",", vDescriptions );
if( sInputDevices.Find("NTPAD") != -1 )
// This can get called before INPUTMAN is constructed.
if( INPUTMAN )
{
LOG->Trace( "Using NTPAD. Don't boost priority." );
return false;
INPUTMAN->GetDevicesAndDescriptions(vDevices,vDescriptions);
CString sInputDevices = join( ",", vDescriptions );
if( sInputDevices.Find("NTPAD") != -1 )
{
LOG->Trace( "Using NTPAD. Don't boost priority." );
return false;
}
}
}
#endif