prevent crash

This commit is contained in:
M66B 2020-03-20 07:57:45 +01:00
parent 3ed81bb63f
commit 2165f062b2
1 changed files with 13 additions and 4 deletions

View File

@ -87,12 +87,21 @@ public class NavMenuItem {
}
void onClick() {
click.run();
try {
click.run();
} catch (Throwable ex) {
Log.e(ex);
}
}
boolean onLongClick() {
if (longClick != null)
longClick.run();
return (longClick != null);
try {
if (longClick != null)
longClick.run();
return (longClick != null);
} catch (Throwable ex) {
Log.e(ex);
return false;
}
}
}