Log an error for a Backend name conflict
Log an error and early-out if a backend with the same name is registered multiple times. Change-Id: Iec27c2987a3bb15702291870230d0bcac4a0704b
This commit is contained in:
parent
0e8dc3ebca
commit
645d83d8eb
1 changed files with 4 additions and 0 deletions
|
|
@ -48,6 +48,10 @@ BackendManager &BackendManager::GetInstance() {
|
|||
|
||||
void BackendManager::RegisterBackend(const std::string &name,
|
||||
PipelineCreator *pipeline_creator) {
|
||||
if (available_backends_.count(name) != 0) {
|
||||
ALOGE("Backend %s already registered.", name.c_str());
|
||||
return;
|
||||
}
|
||||
available_backends_[name] = pipeline_creator;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue