zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 512852d670971b9cfe170303fcae12a64b5043f7
parent 16b2ca1c9d75b2aff607edb6ae520cf157479ef5
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Wed, 17 Aug 2016 15:36:54 -0400

Middleware: Add More Liblo Error Handling

Diffstat:
Msrc/Misc/MiddleWare.cpp | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -1614,6 +1614,10 @@ void MiddleWareImpl::sendToRemote(const char *rtmsg, std::string dest) } else if(!dest.empty()) { lo_message msg = lo_message_deserialise((void*)rtmsg, rtosc_message_length(rtmsg, bToU->buffer_size()), NULL); + if(!msg) { + printf("[ERROR] OSC to <%s> Failed To Parse In Liblo\n", rtmsg); + return; + } //Send to known url lo_address addr = lo_address_new_from_url(dest.c_str()); @@ -1650,6 +1654,11 @@ void MiddleWareImpl::bToUhandle(const char *rtmsg) MwDataObj d(this); middlewareReplyPorts.dispatch(rtmsg, d, true); + if(!rtmsg) { + fprintf(stderr, "[ERROR] Unexpected Null OSC In Zyn\n"); + return; + } + in_order = true; //Normal message not captured by the ports if(d.matches == 0) {