summaryrefslogtreecommitdiffstats
path: root/src/display/nr-arena-shape.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-02-04 15:10:56 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-02-04 15:10:56 +0000
commit9a2bcb294fb75bdfe1c4af93795ca874d1bbca87 (patch)
tree89ff55dcc4e183fd5e6ac4be3e4276b7c6ac8989 /src/display/nr-arena-shape.cpp
parentremove rudimental general-purpose clipart, add some Inkscape-related graphics... (diff)
downloadinkscape-9a2bcb294fb75bdfe1c4af93795ca874d1bbca87.tar.gz
inkscape-9a2bcb294fb75bdfe1c4af93795ca874d1bbca87.zip
Unions Are Evil! When pixblock size is TINY, it stores data right in the data.px field (as data.p) and clears it, so when read as data.px it yields NULL. This fixes the problems with the dropper tool (which uses tiny buffers)
(bzr r2325)
Diffstat (limited to 'src/display/nr-arena-shape.cpp')
-rw-r--r--src/display/nr-arena-shape.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp
index b2003b9e1..d539d0f13 100644
--- a/src/display/nr-arena-shape.cpp
+++ b/src/display/nr-arena-shape.cpp
@@ -756,7 +756,7 @@ nr_arena_shape_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned
nr_pixblock_setup_fast(&m, NR_PIXBLOCK_MODE_A8, area->x0, area->y0, area->x1, area->y1, TRUE);
// if memory allocation failed, abort render
- if (m.data.px == NULL) {
+ if (m.size != NR_PIXBLOCK_SIZE_TINY && m.data.px == NULL) {
nr_pixblock_release (&m);
return (item->state);
}
@@ -794,7 +794,7 @@ nr_arena_shape_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned
nr_pixblock_setup_fast(&m, NR_PIXBLOCK_MODE_A8, area->x0, area->y0, area->x1, area->y1, TRUE);
// if memory allocation failed, abort render
- if (m.data.px == NULL) {
+ if (m.size != NR_PIXBLOCK_SIZE_TINY && m.data.px == NULL) {
nr_pixblock_release (&m);
return (item->state);
}
@@ -859,7 +859,7 @@ nr_arena_shape_clip(NRArenaItem *item, NRRectL *area, NRPixBlock *pb)
nr_pixblock_setup_fast(&m, NR_PIXBLOCK_MODE_A8, area->x0, area->y0, area->x1, area->y1, TRUE);
// if memory allocation failed, abort
- if (m.data.px == NULL) {
+ if (m.size != NR_PIXBLOCK_SIZE_TINY && m.data.px == NULL) {
nr_pixblock_release (&m);
return (item->state);
}