forked from mirrors/gecko-dev
Bug 1883544 - Check whether drag image is valid. r=geckoview-reviewers,amejiamarmol
I don't know how to reproduce this. But according to the reason of `IllegalStateException`, the drop shadow seems to be negative or 0. So I would like to add a check whether the image is valid. Differential Revision: https://phabricator.services.mozilla.com/D203575
This commit is contained in:
parent
05da7fdeee
commit
383afe941b
1 changed files with 5 additions and 1 deletions
|
|
@ -42,7 +42,11 @@ public class GeckoDragAndDrop {
|
|||
private final Bitmap mBitmap;
|
||||
|
||||
public DrawDragImage(final Bitmap bitmap) {
|
||||
mBitmap = bitmap;
|
||||
if (bitmap != null && bitmap.getWidth() > 0 && bitmap.getHeight() > 0) {
|
||||
mBitmap = bitmap;
|
||||
return;
|
||||
}
|
||||
mBitmap = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue