wineandroid: Forward the destroy window ioctl to Java even if the window was freed already.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-07-03 20:57:24 +02:00
parent 28c040c9b0
commit 5b056f61cf
2 changed files with 4 additions and 3 deletions

View File

@ -358,7 +358,8 @@ public void destroy_window_groups()
{
if (window_group != null)
{
if (parent != null) parent.client_group.removeView( window_group );
if (parent != null && parent.client_group != null)
parent.client_group.removeView( window_group );
window_group.destroy_view();
}
if (client_group != null) client_group.destroy_view();

View File

@ -604,7 +604,7 @@ static NTSTATUS destroyWindow_ioctl( void *data, DWORD in_size, DWORD out_size,
if (in_size < sizeof(*res)) return STATUS_INVALID_PARAMETER;
if (!(win_data = get_ioctl_native_win_data( &res->hdr ))) return STATUS_INVALID_HANDLE;
win_data = get_ioctl_native_win_data( &res->hdr );
TRACE( "hwnd %08x opengl %u\n", res->hdr.hwnd, res->hdr.opengl );
@ -613,7 +613,7 @@ static NTSTATUS destroyWindow_ioctl( void *data, DWORD in_size, DWORD out_size,
wrap_java_call();
(*jni_env)->CallVoidMethod( jni_env, object, method, res->hdr.hwnd );
unwrap_java_call();
free_native_win_data( win_data );
if (win_data) free_native_win_data( win_data );
return STATUS_SUCCESS;
}