mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-12 15:07:11 -06:00
catch npe
This commit is contained in:
@@ -100,8 +100,13 @@ debug*/
|
|||||||
Image image = getResolutionVariant( destImageWidth, destImageHeight );
|
Image image = getResolutionVariant( destImageWidth, destImageHeight );
|
||||||
|
|
||||||
// size of image
|
// size of image
|
||||||
int imageWidth = image.getWidth( null );
|
int imageWidth = -1;
|
||||||
int imageHeight = image.getHeight( null );
|
int imageHeight = -1;
|
||||||
|
|
||||||
|
if (image != null) {
|
||||||
|
imageWidth = image.getWidth( null );
|
||||||
|
imageHeight = image.getHeight( null );
|
||||||
|
}
|
||||||
|
|
||||||
// paint red rectangle if image has invalid size (e.g. not found)
|
// paint red rectangle if image has invalid size (e.g. not found)
|
||||||
if( imageWidth < 0 || imageHeight < 0 ) {
|
if( imageWidth < 0 || imageHeight < 0 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user