Exit method when bufferedimage is null

MYC-Refactor
sgoudham 3 years ago
parent 57b4b96877
commit 6beeaafad9
No known key found for this signature in database
GPG Key ID: EF51A29A50FB754C

@ -44,6 +44,8 @@ class MacClipboardListener extends ClipboardListener {
if (isImageMonitored()) { if (isImageMonitored()) {
if (IMAGE.isAvailable(clipboard)) { if (IMAGE.isAvailable(clipboard)) {
BufferedImage bufferedImageContent = getImageContent(newClipboardContents); BufferedImage bufferedImageContent = getImageContent(newClipboardContents);
if (bufferedImageContent == null) return;
Dimension newDimensionContent = new Dimension(bufferedImageContent.getWidth(), bufferedImageContent.getHeight()); Dimension newDimensionContent = new Dimension(bufferedImageContent.getWidth(), bufferedImageContent.getHeight());
if (!newDimensionContent.equals(myClipboardContents[0].getOldContent())) { if (!newDimensionContent.equals(myClipboardContents[0].getOldContent())) {
// getEventManager().notifyImageEvent(bufferedImageContent); // getEventManager().notifyImageEvent(bufferedImageContent);

Loading…
Cancel
Save