comparison android/dw.cpp @ 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 09775418c776
comparison
equal deleted inserted replaced
2727:bf585f375286 2728:850da6b24830
685 { 685 {
686 DWPrint *print = (DWPrint *)pr; 686 DWPrint *print = (DWPrint *)pr;
687 687
688 if(print && print->drawfunc) 688 if(print && print->drawfunc)
689 { 689 {
690 HPIXMAP pixmap = (HPIXMAP)alloca(sizeof(HPIXMAP)); 690 HPIXMAP pixmap = (HPIXMAP)alloca(sizeof(struct _hpixmap));
691 691
692 memset(pixmap, 0, sizeof(struct _hpixmap));
692 pixmap->width = width; 693 pixmap->width = width;
693 pixmap->height = height; 694 pixmap->height = height;
694 pixmap->bitmap = bitmap; 695 pixmap->bitmap = bitmap;
695 pixmap->handle = nullptr;
696 696
697 print->drawfunc(print, pixmap, (int)page, print->drawdata); 697 print->drawfunc(print, pixmap, (int)page, print->drawdata);
698 } 698 }
699 } 699 }
700 700