If the underlying RtMidiOut client could not be successfully created in the constructor handle will be set to a nullptr.
Before this patch the closePort method would be called on a null value resulting in a segmentation fault that crashes the whole node.js process in which the library is used.
The input class already has this check implemented, it is only missing in the output class.
If the underlying
RtMidiOut
client could not be successfully created in the constructorhandle
will be set to a nullptr.Before this patch the
closePort
method would be called on a null value resulting in a segmentation fault that crashes the whole node.js process in which the library is used.The input class already has this check implemented, it is only missing in the output class.