diff options
author | smallsql <smallsql> | 2013-01-26 15:52:59 +0400 |
---|---|---|
committer | smallsql <smallsql> | 2013-01-26 15:52:59 +0400 |
commit | 71230e8bd129487974840c72698c476903897488 (patch) | |
tree | c9b9ee71748d755ae03164315107c4dcaabb623e /openjdk/java | |
parent | 30bee99c9b30b456a71b63a11492d84e519ade28 (diff) |
Monitor must create before usage else it throw a NPE. This fix a NPE with usage of the not standard constructors of BufferedImage.
Diffstat (limited to 'openjdk/java')
-rw-r--r-- | openjdk/java/awt/image/BufferedImage.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openjdk/java/awt/image/BufferedImage.java b/openjdk/java/awt/image/BufferedImage.java index 6984f504..33c9c270 100644 --- a/openjdk/java/awt/image/BufferedImage.java +++ b/openjdk/java/awt/image/BufferedImage.java @@ -687,8 +687,8 @@ public class BufferedImage extends java.awt.Image { throw new IllegalArgumentException(); } + bitmap = createBitmap(width, height); synchronized( bitmap ) { - bitmap = createBitmap(width, height); cli.System.Drawing.Rectangle rect = new cli.System.Drawing.Rectangle(0, 0, width, height); cli.System.Drawing.Imaging.BitmapData data = bitmap.LockBits(rect, ImageLockMode.wrap(ImageLockMode.WriteOnly), PixelFormat.wrap(PixelFormat.Format32bppArgb)); cli.System.IntPtr pixelPtr = data.get_Scan0(); |