Mercurial > dwindows
diff android/dw.cpp @ 2537:cd9d2ba251d5
Android: Reimplement drawPolygon() using drawPath() instead of drawLines/Points().
Add some extra safety checks before calling into drawPolygon().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 11 May 2021 22:44:45 +0000 |
parents | d862d9e4069b |
children | 822f814a54f4 |
line wrap: on
line diff
--- a/android/dw.cpp Tue May 11 22:19:28 2021 +0000 +++ b/android/dw.cpp Tue May 11 22:44:45 2021 +0000 @@ -2582,7 +2582,7 @@ { JNIEnv *env; - if((handle || pixmap) && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) + if((handle || pixmap) && npoints > 0 && x && y && (env = (JNIEnv *)pthread_getspecific(_dw_env_key))) { jintArray jx = env->NewIntArray(npoints); jintArray jy = env->NewIntArray(npoints);