diff options
| author | Lauri Kasanen <cand@gmx.com> | 2014-09-06 13:22:28 +0000 |
|---|---|---|
| committer | Lauri Kasanen <cand@gmx.com> | 2014-09-06 13:22:28 +0000 |
| commit | 031a30a4b5d4d6b9ff8caee618e515ba8766c4af (patch) | |
| tree | e96bac027decd98caea41012509cff070401f955 /src/Fl_Image.cxx | |
| parent | 8bc524ef275d43d501d81958cb9b359a3b55dbec (diff) | |
Bilinear div-by-zero fix
Probably temporary if this will be replaced with Roman's int version, but
better have it anyway.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10281 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Image.cxx')
| -rw-r--r-- | src/Fl_Image.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 08e539288..71e117799 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -338,7 +338,7 @@ Fl_Image *Fl_RGB_Image::copy(int W, int H) { downright[i] * rightf) * downf; } - if (d() == 4) { + if (d() == 4 && new_ptr[3]) { for (i = 0; i < 3; i++) { new_ptr[i] /= new_ptr[3] / 255.0f; } |
