Skip to content

Commit

Permalink
Fix crash in BasicImageFieldController due to uninitialized properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstbit authored and BrayanDSO committed Jul 29, 2023
1 parent 13c103e commit 1b7dc30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,8 @@ class BasicImageFieldController : FieldControllerBase(), IFieldController {
// ensure the previous preview is not visible
private fun hideImagePreview() {
BitmapUtil.freeImageView(mImagePreview)
mCropButton.visibility = View.INVISIBLE
mImageFileSize.visibility = View.INVISIBLE
if (::mCropButton.isInitialized) mCropButton.visibility = View.INVISIBLE
if (::mImageFileSize.isInitialized) mImageFileSize.visibility = View.INVISIBLE
}

override fun onDestroy() {
Expand Down

0 comments on commit 1b7dc30

Please sign in to comment.