changeset 2728:850da6b24830

Android: Fix a crash setting pixmap font in print callback. The typeface field needed to be zeroed out.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 11 Dec 2021 14:44:37 +0000
parents bf585f375286
children f9df10c66353
files android/dw.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/android/dw.cpp	Sat Dec 11 14:14:26 2021 +0000
+++ b/android/dw.cpp	Sat Dec 11 14:44:37 2021 +0000
@@ -687,12 +687,12 @@
 
     if(print && print->drawfunc)
     {
-        HPIXMAP pixmap = (HPIXMAP)alloca(sizeof(HPIXMAP));
-
+        HPIXMAP pixmap = (HPIXMAP)alloca(sizeof(struct _hpixmap));
+
+        memset(pixmap, 0, sizeof(struct _hpixmap));
         pixmap->width = width;
         pixmap->height = height;
         pixmap->bitmap = bitmap;
-        pixmap->handle = nullptr;
 
         print->drawfunc(print, pixmap, (int)page, print->drawdata);
     }