Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If ModbusReq wasn't initialised it will crash when ModbusReq.getInstance().destory() #13

Open
JustTrust opened this issue Nov 27, 2018 · 0 comments

Comments

@JustTrust
Copy link

JustTrust commented Nov 27, 2018

When we call ModbusReq.getInstance().destory() it will crash because ModbusReq wasn't initialised.
There is no way to check it was initialised or not. In destroy method this.mModbusMaster.destroy() this string will lead to null pointer exception because this.mModbusMaster is null. Can you add check before. Something like this if(this.isInit == true) than destroy it.
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant