changeset 16842:78d1ef540864

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 6f94405b43ac
children 708f958bee98
files 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/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c	Thu Mar 02 17:18:23 2017 +0300
+++ b/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);
         }
     }