summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-color-slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/sp-color-slider.cpp')
-rw-r--r--src/widgets/sp-color-slider.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/widgets/sp-color-slider.cpp b/src/widgets/sp-color-slider.cpp
index 471ee3852..9b13ba1c5 100644
--- a/src/widgets/sp-color-slider.cpp
+++ b/src/widgets/sp-color-slider.cpp
@@ -729,7 +729,7 @@ sp_color_slider_render_map (gint x0, gint y0, gint width, gint height,
{
static guchar *buf = NULL;
static gint bs = 0;
- guchar *dp, *sp;
+ guchar *dp;
gint x, y;
if (buf && (bs < width * height)) {
@@ -744,13 +744,12 @@ sp_color_slider_render_map (gint x0, gint y0, gint width, gint height,
dp = buf;
for (x = x0; x < x0 + width; x++) {
gint cr, cg, cb, ca;
- guchar *d;
- sp = map + 4 * (start >> 16);
+ guchar *d = dp;
+ guchar *sp = map + 4 * (start >> 16);
cr = *sp++;
cg = *sp++;
cb = *sp++;
ca = *sp++;
- d = dp;
for (y = y0; y < y0 + height; y++) {
guint bg, fc;
/* Background value */