mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
catch npe
This commit is contained in:
@@ -100,8 +100,13 @@ debug*/
|
||||
Image image = getResolutionVariant( destImageWidth, destImageHeight );
|
||||
|
||||
// size of image
|
||||
int imageWidth = image.getWidth( null );
|
||||
int imageHeight = image.getHeight( null );
|
||||
int imageWidth = -1;
|
||||
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)
|
||||
if( imageWidth < 0 || imageHeight < 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user