13
0

add check for descriptor when deciding whether to register a control surface request buffer factory

This commit is contained in:
Paul Davis 2015-12-29 05:20:50 -05:00
parent 135eedc685
commit 6a8b8c8523

View File

@ -495,6 +495,12 @@ ControlProtocolManager::register_request_buffer_factories ()
Glib::Threads::Mutex::Lock lm (protocols_lock);
for (list<ControlProtocolInfo*>::iterator i = control_protocol_info.begin(); i != control_protocol_info.end(); ++i) {
if ((*i)->descriptor == 0) {
warning << string_compose (_("Control protocol \"%1\" has no descriptor"), (*i)->name) << endmsg;
continue;
}
if ((*i)->descriptor->request_buffer_factory) {
EventLoop::register_request_buffer_factory ((*i)->descriptor->name, (*i)->descriptor->request_buffer_factory);
}