# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1632520217 0 # Node ID 3a14d7fd4b992bcd6d3f20a74cb9e46d50a20afe # Parent ad6fc7f1a9af26b1d321495007e32b80d827a6ba Android: Catch NumberFormatException in isDWResource(). This prevents a crash on non-numeric image assets. diff -r ad6fc7f1a9af -r 3a14d7fd4b99 android/DWindows.kt --- a/android/DWindows.kt Fri Sep 24 13:57:16 2021 +0000 +++ b/android/DWindows.kt Fri Sep 24 21:50:17 2021 +0000 @@ -810,17 +810,18 @@ for (ext in DWImageExts) { if (ext.isNotEmpty() && filename.endsWith(ext)) { val filebody: String = filename.substring(7, length - ext.length) - if (filebody.toInt() > 0) { - return true + try { + if (filebody.toInt() > 0) { + return true + } + } catch(e: NumberFormatException) { } } } return false } - /** - * extracts assets/ in the APK to the application cache directory - */ + // Extracts assets/ in the APK to the application cache directory private fun extractAssets() { var zipFile: ZipFile? = null val targetDir = cacheDir