AndroidLayout: ignore exceptions during measure

This fixes a crash with the Flower Finder test apk, where
ActionBarContextView doesn't allow MEASURE_SPEC_UNSPECIFIED
This commit is contained in:
Julian Winkler
2023-11-03 21:53:53 +01:00
parent 5813f9741d
commit 29e88b08d8

View File

@@ -34,8 +34,10 @@ static void android_layout_measure(GtkLayoutManager *layout_manager, GtkWidget *
heightMeasureSpec = _GET_INT_FIELD(layout->view, "oldHeightMeasureSpec");
if (widthMeasureSpec != -1 && heightMeasureSpec != -1) {
(*env)->CallVoidMethod(env, layout->view, handle_cache.view.measure, widthMeasureSpec, heightMeasureSpec);
if((*env)->ExceptionCheck(env))
if((*env)->ExceptionCheck(env)) {
(*env)->ExceptionDescribe(env);
(*env)->ExceptionClear(env);
}
}
}