瀏覽代碼

little fix

Ethosa 2 年之前
父節點
當前提交
a973ba7170
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/com/ethosa/ktc/utils/HtmlImageGetter.kt

+ 1 - 1
app/src/main/java/com/ethosa/ktc/utils/HtmlImageGetter.kt

@@ -37,7 +37,7 @@ class HtmlImageGetter(
 
                 // Scale image with keep aspect ratio
                 val width = res.displayMetrics.widthPixels
-                val aspectRatio = drawable.intrinsicWidth.toFloat() / drawable.intrinsicHeight
+                val aspectRatio = drawable!!.intrinsicWidth.toFloat() / drawable.intrinsicHeight
                 val height = (width / aspectRatio).toInt()
 
                 // Change bounds