Monitor must create before usage else it throw a NPE. This fix a NPE with usage of the not standard constructors of BufferedImage.

This commit is contained in:
smallsql 2013-01-26 11:52:59 +00:00
Родитель 30bee99c9b
Коммит 71230e8bd1
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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();