diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-20 10:33:31 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-20 10:33:46 +0100 |
| commit | aa9e2e888ef7eaca961e6d7c17ec1ebab0469e54 (patch) | |
| tree | 4c0ec7fda35a79604b03f485e30156a6e2b57e83 /src/fl_read_image.cxx | |
| parent | aa140973a386b16130289c1a8c97b9ae6712ee98 (diff) | |
Fix for issue #159 - continued
Changes here concentrate the fix within static function alpha_blend() and thus
are visible only when drawing transparent images under X11 platform
without Xrender.
Diffstat (limited to 'src/fl_read_image.cxx')
| -rw-r--r-- | src/fl_read_image.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fl_read_image.cxx b/src/fl_read_image.cxx index 90cefe5a7..de6907fe4 100644 --- a/src/fl_read_image.cxx +++ b/src/fl_read_image.cxx @@ -50,7 +50,7 @@ uchar *fl_read_image(uchar *p, int X, int Y, int w, int h, int alpha) { img = Fl_Screen_Driver::traverse_to_gl_subwindows(Fl_Window::current(), X, Y, w, h, NULL); } int depth = alpha ? 4 : 3; - if (img->d() != depth) { + if (img && img->d() != depth) { uchar *data = new uchar[img->w() * img->h() * depth]; if (depth == 4) memset(data, alpha, img->w() * img->h() * depth); uchar *d = data; |
