summaryrefslogtreecommitdiff
path: root/osframework/source/SexyAppFramework/InputDriverFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'osframework/source/SexyAppFramework/InputDriverFactory.h')
-rw-r--r--osframework/source/SexyAppFramework/InputDriverFactory.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/osframework/source/SexyAppFramework/InputDriverFactory.h b/osframework/source/SexyAppFramework/InputDriverFactory.h
index fbe5158..6808a2d 100644
--- a/osframework/source/SexyAppFramework/InputDriverFactory.h
+++ b/osframework/source/SexyAppFramework/InputDriverFactory.h
@@ -29,9 +29,11 @@ class InputDriverFactory: public DriverFactory
static InputDriverFactory* GetInputDriverFactory ();
private:
- void Load();
+ void Load();
private:
+ friend class StaticInputDriverFactory;
+
InputDriverFactory ();
~InputDriverFactory ();
};
@@ -45,7 +47,8 @@ class InputDriverRegistor
InputDriverFactory* factory;
factory = InputDriverFactory::GetInputDriverFactory ();
- factory->AddDriver (mDriver);
+ if (factory)
+ factory->AddDriver (mDriver);
}
~InputDriverRegistor()
@@ -53,7 +56,8 @@ class InputDriverRegistor
InputDriverFactory* factory;
factory = InputDriverFactory::GetInputDriverFactory ();
- factory->RemoveDriver (mDriver);
+ if (factory)
+ factory->RemoveDriver (mDriver);
}
private: