From: kiirala Date: Wed, 6 Feb 2008 07:47:18 +0000 (+0000) Subject: Fixed crash with lighting effects used on non-premultiplied input (bug 189468) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=05f0aa763684e19a10da045d998967d34bb6afc1;p=inkscape.git Fixed crash with lighting effects used on non-premultiplied input (bug 189468) --- 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);