summaryrefslogtreecommitdiff
path: root/src/blitter
diff options
context:
space:
mode:
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/factory.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/blitter/factory.hpp b/src/blitter/factory.hpp
index c76126fb5..94f3f9998 100644
--- a/src/blitter/factory.hpp
+++ b/src/blitter/factory.hpp
@@ -61,13 +61,14 @@ protected:
name(name), description(description)
{
if (usable) {
+ Blitters &blitters = GetBlitters();
+ assert(blitters.find(this->name) == blitters.end());
/*
* Only add when the blitter is usable. Do not bail out or
* do more special things since the blitters are always
* instantiated upon start anyhow and freed upon shutdown.
*/
- std::pair<Blitters::iterator, bool> P = GetBlitters().insert(Blitters::value_type(this->name, this));
- assert(P.second);
+ blitters.insert(Blitters::value_type(this->name, this));
} else {
DEBUG(driver, 1, "Not registering blitter %s as it is not usable", name);
}