8204085: avoid printing uninitialized pointer in java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
authormbaesken
Wed, 30 May 2018 15:01:36 +0200
changeset 50360 8fbbd19bf3a1
parent 50359 dd9ec7e7e35a
child 50361 071f1fe0df5f
8204085: avoid printing uninitialized pointer in java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp Reviewed-by: clanger, prr, serb, stuefe
src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp
--- a/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp	Thu May 31 13:04:30 2018 -0700
+++ b/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp	Wed May 30 15:01:36 2018 +0200
@@ -490,7 +490,7 @@
 JNIEXPORT AwtComponent * JNICALL
 GDIWindowSurfaceData_GetComp(JNIEnv *env, GDIWinSDOps *wsdo)
 {
-    PDATA pData;
+    PDATA pData = NULL;
     jobject localObj = env->NewLocalRef(wsdo->peer);
 
     if (localObj == NULL || (pData = JNI_GET_PDATA(localObj)) == NULL) {