Closed cansik closed 6 years ago
Prevents null-pointer exception if the server not yet has been initialised. This happens if the user try's to check if there are clients before sending out an image.
void sendImageIfNecessary(PImage img) { if(syphon.hasClients()) syphon.sendImage(img); }
In this example we check if syphon has clients connected, but because the sendImage command was never called, the server is not initialised.
sendImage
server
Hey this makes a ton of sense, thank you for the PR and the report. I dont see anything wrong with this, really appreciate it!
Prevents null-pointer exception if the server not yet has been initialised. This happens if the user try's to check if there are clients before sending out an image.
In this example we check if syphon has clients connected, but because the
sendImage
command was never called, theserver
is not initialised.