8175513: JNI exception pending in awt_GraphicsEnv.c:2021
authorvadim
Thu, 02 Mar 2017 20:24:12 +0300
changeset 44150 022f5ba40098
parent 44149 92b8963f6498
child 44151 bb5790b4b278
8175513: JNI exception pending in awt_GraphicsEnv.c:2021 Reviewed-by: serb, alexsch
jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c
--- 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);
         }
     }