From 3d8ce35924b8020ef42832aa4519c187d6da99ca Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 1 Jun 2017 15:15:26 -0700 Subject: [PATCH] 8180015: Cleaner AWT robot handling Reviewed-by: prr, mschoene, rhalade --- src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp b/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp index 12432ebf14f..4db3de5ad8d 100644 --- a/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp +++ b/src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp @@ -285,7 +285,7 @@ void AwtRobot::GetRGBPixels(jint x, jint y, jint width, jint height, jintArray p // copy pixels into Java array env->SetIntArrayRegion(pixelArray, 0, numPixels, (jint *)pixelData); - delete pinfo; + delete[] pinfo; // free all the GDI objects we made ::SelectObject(hdcMem, hOldBitmap);