remove old handler if it was set

This commit is contained in:
Sandra Keßler 2017-08-11 23:58:45 +02:00
parent e2b09f9e42
commit 1c1ea14b3c

View file

@ -60,6 +60,8 @@ public class RuffyScripter {
public void start(IRuffyService newService) {
try {
if(ruffyService!=null)
try{ruffyService.removeHandler(mHandler);}catch(Exception e){};
if(newService!=null) {
this.ruffyService = newService;
// TODO this'll be done better in v2 via ConnectionManager