From 49344c4a9033b2f5d9620f61cb4516c45c96ae70 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 6 Dec 2014 15:12:50 +0100 Subject: [PATCH] Refactor application --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index ee149efca1..3968ca0eca 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -558,13 +558,15 @@ public class OsmandApplication extends Application { if (!"qnx".equals(System.getProperty("os.name"))) { if (osmandSettings.USE_OPENGL_RENDER.get()) { + boolean success = false; if (!osmandSettings.OPENGL_RENDER_FAILED.get()) { osmandSettings.OPENGL_RENDER_FAILED.set(true); - boolean success = NativeCoreContext.tryCatchInit(this); + success = NativeCoreContext.tryCatchInit(this); if (success) { osmandSettings.OPENGL_RENDER_FAILED.set(false); } - } else { + } + if (!success) { // try next time once again ? osmandSettings.OPENGL_RENDER_FAILED.set(false); warnings.add("Native OpenGL library is not supported. Please try again after exit");