Skip to content

Commit

Permalink
Merge pull request #608 from hansemannn/fix/guard-blob-processing
Browse files Browse the repository at this point in the history
fix: guard invalid blob creation
  • Loading branch information
hansemannn committed Dec 15, 2022
2 parents 4a2f8c5 + 1575999 commit 2f033b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion android/manifest
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 5.5.0
version: 5.5.1
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: External version of Map module using native Google Maps library
Expand Down
9 changes: 7 additions & 2 deletions android/src/ti/map/AnnotationProxy.java
Expand Up @@ -324,6 +324,7 @@ private void handleImage(Object image)
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(bitmap));
setIconImageDimensions(bitmap.getWidth(), bitmap.getHeight());
} catch (Exception e) {
Log.e(TAG, e.getMessage());
}
return;
}
Expand All @@ -333,8 +334,12 @@ private void handleImage(Object image)
if (image instanceof TiBlob) {
Bitmap bitmap = ((TiBlob) image).getImage();
if (bitmap != null) {
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(bitmap));
setIconImageDimensions(bitmap.getWidth(), bitmap.getHeight());
try {
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(bitmap));
setIconImageDimensions(bitmap.getWidth(), bitmap.getHeight());
} catch (Exception e) {
Log.e(TAG, e.getMessage());
}
return;
}
}
Expand Down

0 comments on commit 2f033b3

Please sign in to comment.