summaryrefslogtreecommitdiff
path: root/src/fl_draw_pixmap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/fl_draw_pixmap.cxx')
-rw-r--r--src/fl_draw_pixmap.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fl_draw_pixmap.cxx b/src/fl_draw_pixmap.cxx
index 735fe30c3..11ffe0f49 100644
--- a/src/fl_draw_pixmap.cxx
+++ b/src/fl_draw_pixmap.cxx
@@ -203,7 +203,7 @@ int fl_convert_pixmap(const char*const* cdata, uchar* out, Fl_Color bg) {
// assume "None" or "#transparent" for any errors
// "bg" should be transparent...
Fl::get_color(bg, c[0], c[1], c[2]);
- c[3] = 0;
+ c[3] = 255;
if (Fl_Graphics_Driver::need_pixmap_bg_color) transparent_c = c;
} // if parse
} // for ncolors
@@ -254,7 +254,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
// build the mask bitmap used by Fl_Pixmap:
uchar **p = fl_graphics_driver->mask_bitmap();
- if (p) {
+ if (p && *p) {
int W = (w+7)/8;
uchar* bitmap = new uchar[W * h];
*p = bitmap;