summaryrefslogtreecommitdiff
path: root/indra/llkdu/llimagej2ckdu.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-01-05 16:12:15 -0500
committerprep <prep@lindenlab.com>2011-01-05 16:12:15 -0500
commitc9f3a5574e223bec95b4ec374fd164ba9a486c2a (patch)
treeedbd6574b4133488f82e872bb86d3aacda4af216 /indra/llkdu/llimagej2ckdu.cpp
parent5b09da5079d576678eb5d66a5518044d1b22664f (diff)
parent7c7527b6727a6070fd7679ea28e4e2692452bf27 (diff)
merge
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);