Skip to content

Commit f6d21a7

Browse files
committed
chore(android): trying to prevent NPE
1 parent 0f6404b commit f6d21a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • plugin-nativeprocessor/platforms/android/java/com/akylas/documentscanner

plugin-nativeprocessor/platforms/android/java/com/akylas/documentscanner/CropView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
247247
if (oldValue == null || newValue == null) {
248248
return;
249249
}
250-
if(autoScanProgress.containsKey(oldValue) && autoScanProgress[oldValue] != null) {
250+
if(autoScanProgress != null && autoScanProgress.containsKey(oldValue) && autoScanProgress[oldValue] != null) {
251251
autoScanProgress[newValue] = autoScanProgress[oldValue]!!
252252
// we don't remove as the MaxSizeHashMap will handle it
253253
// as AutoScanHandler process and this drawing are async

0 commit comments

Comments
 (0)