diff android/dw.cpp @ 2539:822f814a54f4

Android: Fix memory corruption issue due to incorrectly allocating HPIXMAP. Also call DWRender.invalidate() from the main thread incase it wants to cause an immediate onDraw() ... but we don't need to wait for it.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 12 May 2021 06:17:22 +0000
parents cd9d2ba251d5
children bb75e64e6138
line wrap: on
line diff
--- a/android/dw.cpp	Tue May 11 22:53:29 2021 +0000
+++ b/android/dw.cpp	Wed May 12 06:17:22 2021 +0000
@@ -3433,7 +3433,7 @@
 
     if(jbitmap)
     {
-        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(HPIXMAP));
+        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(struct _hpixmap));
 
         if(pixmap)
         {
@@ -3464,7 +3464,7 @@
 
     if(jbitmap)
     {
-        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(HPIXMAP));
+        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(struct _hpixmap));
 
         if(pixmap)
         {
@@ -3494,7 +3494,7 @@
 
     if(jbitmap)
     {
-        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(HPIXMAP));
+        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(struct _hpixmap));
 
         if(pixmap)
         {
@@ -3535,7 +3535,7 @@
 
     if(jbitmap)
     {
-        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(HPIXMAP));
+        HPIXMAP pixmap = (HPIXMAP)calloc(1, sizeof(struct _hpixmap));
 
         if(pixmap)
         {