summaryrefslogtreecommitdiffstats
path: root/src/display/nr-arena-item.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-item.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-item.cpp')
-rw-r--r--src/display/nr-arena-item.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display/nr-arena-item.cpp b/src/display/nr-arena-item.cpp
index e7eab8b85..68e4d3c9e 100644
--- a/src/display/nr-arena-item.cpp
+++ b/src/display/nr-arena-item.cpp
@@ -377,7 +377,7 @@ nr_arena_item_invoke_render (NRArenaItem *item, NRRectL const *area,
TRUE);
// if memory allocation failed, abort render
- if (ipb.data.px == NULL) {
+ if (ipb.size != NR_PIXBLOCK_SIZE_TINY && ipb.data.px == NULL) {
nr_pixblock_release (&ipb);
return (item->state);
}
@@ -836,7 +836,7 @@ nr_arena_item_get_background (NRArenaItem const *item, int depth)
item->background_pb->area.y0,
item->background_pb->area.x1,
item->background_pb->area.y1, true);
- if (pb->data.px == NULL) // allocation failed
+ if (pb->size != NR_PIXBLOCK_SIZE_TINY && pb->data.px == NULL) // allocation failed
return NULL;
} else if (item->parent) {
pb = nr_arena_item_get_background (item->parent, depth + 1);