forked from teamnwah/openmw-tes3coop
Fix coverity defects
This commit is contained in:
parent
e69750905a
commit
1264651af7
3 changed files with 7 additions and 7 deletions
|
@ -709,7 +709,7 @@ namespace MWPhysics
|
|||
bool PhysicsSystem::isOnSolidGround (const MWWorld::Ptr& actor) const
|
||||
{
|
||||
const Actor* physactor = getActor(actor);
|
||||
if (!physactor->getOnGround())
|
||||
if (!physactor || !physactor->getOnGround())
|
||||
return false;
|
||||
|
||||
CollisionMap::const_iterator found = mStandingCollisions.find(actor);
|
||||
|
|
|
@ -363,9 +363,9 @@ OpenAL_SoundStream::OpenAL_SoundStream(ALuint src, DecoderPtr decoder)
|
|||
|
||||
switch(type)
|
||||
{
|
||||
case SampleType_UInt8: mSilence = 0x80;
|
||||
case SampleType_Int16: mSilence = 0x00;
|
||||
case SampleType_Float32: mSilence = 0x00;
|
||||
case SampleType_UInt8: mSilence = 0x80; break;
|
||||
case SampleType_Int16: mSilence = 0x00; break;
|
||||
case SampleType_Float32: mSilence = 0x00; break;
|
||||
}
|
||||
|
||||
mFrameSize = framesToBytes(1, chans, type);
|
||||
|
|
|
@ -48,9 +48,6 @@ namespace MWSound
|
|||
, mListenerUp(0,0,1)
|
||||
, mPausedSoundTypes(0)
|
||||
{
|
||||
if(!useSound)
|
||||
return;
|
||||
|
||||
mMasterVolume = Settings::Manager::getFloat("master volume", "Sound");
|
||||
mMasterVolume = std::min(std::max(mMasterVolume, 0.0f), 1.0f);
|
||||
mSFXVolume = Settings::Manager::getFloat("sfx volume", "Sound");
|
||||
|
@ -67,6 +64,9 @@ namespace MWSound
|
|||
mBufferCacheMax *= 1024*1024;
|
||||
mBufferCacheMin = std::min(mBufferCacheMin*1024*1024, mBufferCacheMax);
|
||||
|
||||
if(!useSound)
|
||||
return;
|
||||
|
||||
std::string hrtfname = Settings::Manager::getString("hrtf", "Sound");
|
||||
int hrtfstate = Settings::Manager::getInt("hrtf enable", "Sound");
|
||||
|
||||
|
|
Loading…
Reference in a new issue