summaryrefslogtreecommitdiff
path: root/source/fitz/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/context.c')
-rw-r--r--source/fitz/context.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/fitz/context.c b/source/fitz/context.c
index c65377a8..72ea2d6a 100644
--- a/source/fitz/context.c
+++ b/source/fitz/context.c
@@ -121,10 +121,16 @@ cleanup:
}
fz_context *
-fz_new_context(fz_alloc_context *alloc, fz_locks_context *locks, unsigned int max_store)
+fz_new_context_imp(fz_alloc_context *alloc, fz_locks_context *locks, unsigned int max_store, const char *version)
{
fz_context *ctx;
+ if (strcmp(version, FZ_VERSION))
+ {
+ fprintf(stderr, "cannot create context: incompatible header (%s) and library (%s) versions", version, FZ_VERSION);
+ return NULL;
+ }
+
if (!alloc)
alloc = &fz_alloc_default;