From 5921e1f9cafe7f8b480576f7781327f9791d31a6 Mon Sep 17 00:00:00 2001 From: PavelRatushnyi Date: Sat, 30 Sep 2017 15:24:55 +0300 Subject: [PATCH] Fix #4296 --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 53b1938ad2..1e423fc1e4 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -548,7 +548,10 @@ public class OsmandApplication extends MultiDexApplication { } public void startApplication() { - Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler()); + UncaughtExceptionHandler uncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); + if (!(uncaughtExceptionHandler instanceof DefaultExceptionHandler)) { + Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler()); + } appInitializer.startApplication(); }