summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLauri Kasanen <cand@gmx.com>2014-09-06 13:22:28 +0000
committerLauri Kasanen <cand@gmx.com>2014-09-06 13:22:28 +0000
commit031a30a4b5d4d6b9ff8caee618e515ba8766c4af (patch)
treee96bac027decd98caea41012509cff070401f955 /src
parent8bc524ef275d43d501d81958cb9b359a3b55dbec (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')
-rw-r--r--src/Fl_Image.cxx2
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;
}