Alexandre Julliard : wineandroid: Forward the destroy window ioctl to Java even if the window was freed already.
Alexandre Julliard
julliard at winehq.org
Mon Jul 3 15:56:48 CDT 2017
Module: wine
Branch: master
Commit: 5b056f61cf0d5b9e0d3af71877d6a319200e5e8a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b056f61cf0d5b9e0d3af71877d6a319200e5e8a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jul 3 20:57:24 2017 +0200
wineandroid: Forward the destroy window ioctl to Java even if the window was freed already.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wineandroid.drv/WineActivity.java | 3 ++-
dlls/wineandroid.drv/device.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wineandroid.drv/WineActivity.java b/dlls/wineandroid.drv/WineActivity.java
index 6c6edd5..16857f2 100644
--- a/dlls/wineandroid.drv/WineActivity.java
+++ b/dlls/wineandroid.drv/WineActivity.java
@@ -358,7 +358,8 @@ public class WineActivity extends Activity
{
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();
diff --git a/dlls/wineandroid.drv/device.c b/dlls/wineandroid.drv/device.c
index 472f4ba..09ac4f4 100644
--- a/dlls/wineandroid.drv/device.c
+++ b/dlls/wineandroid.drv/device.c
@@ -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;
}
More information about the wine-cvs
mailing list