I fixed the app crashing exception for Android after pressing 'back' key multiple times after opening the print window. (#149)
This commit is contained in:
parent
8b1f92a0a1
commit
ee9fba07ac
@ -347,14 +347,16 @@ public class Printer extends CordovaPlugin {
|
||||
*/
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
pm.unsetOnPrintJobStateChangeListener();
|
||||
if(pm != null && listener != null && command != null && view != null) {
|
||||
pm.unsetOnPrintJobStateChangeListener();
|
||||
|
||||
pm = null;
|
||||
listener = null;
|
||||
command = null;
|
||||
view = null;
|
||||
pm = null;
|
||||
listener = null;
|
||||
command = null;
|
||||
view = null;
|
||||
|
||||
super.onDestroy();
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user