summaryrefslogtreecommitdiff
path: root/fitz/text_extract.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-06-13 16:00:35 +0100
committerRobin Watts <robin.watts@artifex.com>2013-06-13 16:37:06 +0100
commitf85653219a85a9f91cb14471485611ca5f6b25ba (patch)
treed0abcf8b18b90f1430d4dddf4d4ae2e9d3deb07e /fitz/text_extract.c
parent181dca77f819f9953e0eed4b10ee83d0a9153212 (diff)
downloadmupdf-f85653219a85a9f91cb14471485611ca5f6b25ba.tar.xz
Make display lists reference counted objects.
Remove fz_free_display_list from the API; instead use fz_drop_display_list.
Diffstat (limited to 'fitz/text_extract.c')
-rw-r--r--fitz/text_extract.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fitz/text_extract.c b/fitz/text_extract.c
index bf50e6a4..01a789fd 100644
--- a/fitz/text_extract.c
+++ b/fitz/text_extract.c
@@ -369,7 +369,12 @@ fz_new_text_sheet(fz_context *ctx)
void
fz_free_text_sheet(fz_context *ctx, fz_text_sheet *sheet)
{
- fz_text_style *style = sheet->style;
+ fz_text_style *style;
+
+ if (sheet == NULL)
+ return;
+
+ style = sheet->style;
while (style)
{
fz_text_style *next = style->next;
@@ -478,6 +483,8 @@ void
fz_free_text_page(fz_context *ctx, fz_text_page *page)
{
fz_page_block *block;
+ if (page == NULL)
+ return;
for (block = page->blocks; block < page->blocks + page->len; block++)
{
switch (block->type)