When not explicitly setting artDmxCallback via setArtDmxCallback(), it may point to an invalid address other than NULL, since primitive pointers are not initialized by the compiler in c++.
Since read() tries to dereference artDmxCallback if it's not NULL, the program may crash.
As an easy fix, I suggest to initialize artDmxCallback as NULL in the initializer list.
When not explicitly setting
artDmxCallback
viasetArtDmxCallback()
, it may point to an invalid address other than NULL, since primitive pointers are not initialized by the compiler in c++.Since
read()
tries to dereferenceartDmxCallback
if it's not NULL, the program may crash.As an easy fix, I suggest to initialize
artDmxCallback
as NULL in the initializer list.