Browse files

Don't update the external receiver registry while also (potentially) …

…processing it.
  • Loading branch information...
1 parent 8fbe896 commit 1ee58cc07f7a23db08aa83463d8421f9c55a4d5c @mhroth committed Mar 25, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/PdContext.cpp
View
4 src/PdContext.cpp
@@ -423,11 +423,15 @@ float PdContext::getValueForName(char *name) {
}
void PdContext::registerExternalReceiver(const char *receiverName) {
+ lock(); // don't update the external receiver registry while processing it, of course!
sendController->registerExternalReceiver(receiverName);
+ unlock();
}
void PdContext::unregisterExternalReceiver(const char *receiverName) {
+ lock();
sendController->unregisterExternalReceiver(receiverName);
+ unlock();
}

0 comments on commit 1ee58cc

Please sign in to comment.