Skip to content

fix: handle nullable bitmap on Android - #4297

Open
Preeternal wants to merge 1 commit into
rnmapbox:mainfrom
Preeternal:fix-nullable-bitmap-copy
Open

fix: handle nullable bitmap on Android#4297
Preeternal wants to merge 1 commit into
rnmapbox:mainfrom
Preeternal:fix-nullable-bitmap-copy

Conversation

@Preeternal

Copy link
Copy Markdown

Description

Fixes an Android compilation failure in DownloadMapImageTask.kt when building with React Native 0.87.1.

CloseableStaticBitmap.underlyingBitmap is nullable, but DownloadMapImageTask calls copy() on it directly.

Reproducer

Build an Android app using:

  • React Native 0.87.1
  • @rnmapbox/maps 10.3.5
  • New Architecture

The build fails during :rnmapbox_maps:compileDebugKotlin with:

DownloadMapImageTask.kt:80:56 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'Bitmap?'.

Verification

After the change, :rnmapbox_maps:compileDebugKotlin succeeds and the Android build proceeds past this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant