summaryrefslogtreecommitdiff
path: root/osframework/source/SexyAppFramework/SoundDriverFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'osframework/source/SexyAppFramework/SoundDriverFactory.h')
-rw-r--r--osframework/source/SexyAppFramework/SoundDriverFactory.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/osframework/source/SexyAppFramework/SoundDriverFactory.h b/osframework/source/SexyAppFramework/SoundDriverFactory.h
index 86331f8..63ec872 100644
--- a/osframework/source/SexyAppFramework/SoundDriverFactory.h
+++ b/osframework/source/SexyAppFramework/SoundDriverFactory.h
@@ -30,6 +30,8 @@ class SoundDriverFactory: public DriverFactory
void Load();
private:
+ friend class StaticSoundDriverFactory;
+
SoundDriverFactory ();
~SoundDriverFactory ();
};
@@ -43,7 +45,8 @@ class SoundDriverRegistor
SoundDriverFactory* factory;
factory = SoundDriverFactory::GetSoundDriverFactory ();
- factory->AddDriver (mDriver);
+ if (factory)
+ factory->AddDriver (mDriver);
}
~SoundDriverRegistor()
@@ -51,7 +54,8 @@ class SoundDriverRegistor
SoundDriverFactory* factory;
factory = SoundDriverFactory::GetSoundDriverFactory ();
- factory->RemoveDriver (mDriver);
+ if (factory)
+ factory->RemoveDriver (mDriver);
}
private: