diff --git a/wpe/src/main/cpp/Browser/Page.cpp b/wpe/src/main/cpp/Browser/Page.cpp index b12926a42..516bdc105 100644 --- a/wpe/src/main/cpp/Browser/Page.cpp +++ b/wpe/src/main/cpp/Browser/Page.cpp @@ -87,7 +87,7 @@ class JNIPageCache final : public JNI::TypedClass { static gboolean onScriptDialog(Page* page, WebKitScriptDialog* dialog, WebKitWebView* webView) { - auto dialogPtr = static_cast(webkit_script_dialog_ref(dialog)); + auto dialogPtr = reinterpret_cast(webkit_script_dialog_ref(dialog)); auto jActiveURL = JNI::String(webkit_web_view_get_uri(webView)); auto jMessage = JNI::String(webkit_script_dialog_get_message(dialog)); callJavaMethod(getJNIPageCache().m_onScriptDialog, page->m_pageJavaInstance.get(), dialogPtr,