check if happen NullPointer

pull/190/head
xufuji456 3 years ago
parent 2a6ce9b6ac
commit edd617d087
  1. 10
      app/src/main/java/com/frank/ffmpeg/activity/ProbeFormatActivity.kt

@ -45,10 +45,12 @@ class ProbeFormatActivity : BaseActivity() {
MSG_FINISH -> { MSG_FINISH -> {
progressProbe!!.visibility = View.GONE progressProbe!!.visibility = View.GONE
layoutProbe!!.visibility = View.VISIBLE layoutProbe!!.visibility = View.VISIBLE
val result = msg.obj as MediaBean val result = msg.obj?: msg.obj
val resultFormat = JsonParseTool.stringFormat(result) if (result != null) {
if (!TextUtils.isEmpty(resultFormat) && txtProbeFormat != null) { val resultFormat = JsonParseTool.stringFormat(result as MediaBean)
txtProbeFormat!!.text = resultFormat if (!TextUtils.isEmpty(resultFormat) && txtProbeFormat != null) {
txtProbeFormat!!.text = resultFormat
}
} }
} }
else -> { else -> {

Loading…
Cancel
Save