From 05f0aa763684e19a10da045d998967d34bb6afc1 Mon Sep 17 00:00:00 2001 From: kiirala Date: Wed, 6 Feb 2008 07:47:18 +0000 Subject: [PATCH] Fixed crash with lighting effects used on non-premultiplied input (bug 189468) --- src/display/nr-3dutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/display/nr-3dutils.cpp b/src/display/nr-3dutils.cpp index fa1f21d9a..4a4cb78ec 100644 --- a/src/display/nr-3dutils.cpp +++ b/src/display/nr-3dutils.cpp @@ -116,7 +116,7 @@ void compute_surface_normal(Fvector &N, gdouble ss, NRPixBlock *in, int i, int j gdouble accu_x; gdouble accu_y; unsigned char *data = NR_PIXBLOCK_PX (in); - g_assert(in->mode == NR_PIXBLOCK_MODE_R8G8B8A8P); + g_assert(NR_PIXBLOCK_BPP(in) == 4); x_carac = get_carac(j, w, dx); //LEFT, MIDDLE or RIGHT y_carac = get_carac(i, h, dy); //TOP, MIDDLE or BOTTOM alpha_idx = 4*(i*w + j); -- 2.30.2