зеркало из https://github.com/mono/ikvm-fork.git
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:
Родитель
30bee99c9b
Коммит
71230e8bd1
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче