summaryrefslogtreecommitdiff
path: root/indra/llkdu/llimagej2ckdu.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2011-01-07 10:48:38 -0800
committerDon Kjer <don@lindenlab.com>2011-01-07 10:48:38 -0800
commit829c2c86975dd80d13008c38246fa8ea0d10529c (patch)
treee90bda161771de9f3fcd98e2806e8eed7c4222fc /indra/llkdu/llimagej2ckdu.cpp
parenta9bc51e6416dd637080c0307de99d5e09d06dcc4 (diff)
parentc132d20a7433e2d09e3521a15497f661fcbd18b8 (diff)
Merge from viewer-development
Diffstat (limited to 'indra/llkdu/llimagej2ckdu.cpp')
-rw-r--r--indra/llkdu/llimagej2ckdu.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
index 1a286d1406..10ea5685e8 100644
--- a/indra/llkdu/llimagej2ckdu.cpp
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -229,16 +229,17 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod
mCodeStreamp = NULL;
}
- if (!mInputp)
+ if (!mInputp && base.getData())
{
- llassert(base.getData());
// The compressed data has been loaded
- // Setup the source for the codestrea
+ // Setup the source for the codestream
mInputp = new LLKDUMemSource(base.getData(), data_size);
}
- llassert(mInputp);
- mInputp->reset();
+ if (mInputp)
+ {
+ mInputp->reset();
+ }
mCodeStreamp = new kdu_codestream;
mCodeStreamp->create(mInputp);
@@ -1017,7 +1018,7 @@ kdc_flow_control::kdc_flow_control (kdu_image_in_base *img_in, kdu_codestream co
comp->ratio_counter = 0;
comp->remaining_lines = comp->initial_lines = dims.size.y;
}
- assert(num_components > 0);
+ assert(num_components >= 0);
tile.set_components_of_interest(num_components);
max_buffer_memory = engine.create(codestream,tile,false,NULL,false,1,NULL,NULL,false);