changeset 44150:022f5ba40098

8175513: JNI exception pending in awt_GraphicsEnv.c:2021 Reviewed-by: serb, alexsch
author vadim
date Thu, 02 Mar 2017 20:24:12 +0300
parents 92b8963f6498
children bb5790b4b278
files jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c	Thu Mar 02 17:18:23 2017 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c	Thu Mar 02 20:24:12 2017 +0300
@@ -2021,10 +2021,14 @@
                                  X11GD_AddDisplayMode(env, arrayList,
                                         mode->width, mode->height,
                                               BIT_DEPTH_MULTI, (int)(rate +.2));
+                                 if ((*env)->ExceptionCheck(env)) {
+                                     goto ret0;
+                                 }
                                  break;
                             }
                         }
                     }
+ret0:
                     awt_XRRFreeOutputInfo(output_info);
                 }
             }
@@ -2052,12 +2056,12 @@
                                              BIT_DEPTH_MULTI,
                                              rates[j]);
                         if ((*env)->ExceptionCheck(env)) {
-                            break;
+                            goto ret1;
                         }
                     }
                 }
             }
-
+ret1:
             awt_XRRFreeScreenConfigInfo(config);
         }
     }