# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1620715089 0 # Node ID c4255630caded9630a4ee9910e36c7f102da5df3 # Parent 7c863a3a125f64bcb7a46e2368d19fcffb8d65cb Android: Fix the safety check in the dw_draw_*() functions. So we can actually draw on pixmaps, not just on render widgets. diff -r 7c863a3a125f -r c4255630cade android/dw.cpp --- a/android/dw.cpp Tue May 11 05:14:56 2021 +0000 +++ b/android/dw.cpp Tue May 11 06:38:09 2021 +0000 @@ -2480,7 +2480,7 @@ { JNIEnv *env; - if(handle && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) + if((handle || pixmap) && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) { // First get the class that contains the method you need to call jclass clazz = _dw_find_class(env, DW_CLASS_NAME); @@ -2505,7 +2505,7 @@ { JNIEnv *env; - if(handle && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) + if((handle || pixmap) && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) { // First get the class that contains the method you need to call jclass clazz = _dw_find_class(env, DW_CLASS_NAME); @@ -2568,7 +2568,7 @@ { JNIEnv *env; - if(handle && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) + if((handle || pixmap) && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) { // First get the class that contains the method you need to call jclass clazz = _dw_find_class(env, DW_CLASS_NAME);