Skip to content
Browse files

Fix null pointer when download KO or PR

  • Loading branch information...
1 parent 0b1ce3e commit 8fbd53621f3defa6fa0f13eeeced3cef4a9b22f8 @nroduit committed Sep 24, 2012
View
4 ...is-dicom/weasis-dicom-codec/src/main/java/org/weasis/dicom/codec/DicomSpecialElement.java
@@ -74,7 +74,7 @@ public void dispose() {
List<DicomSpecialElement> filteredList = new ArrayList<DicomSpecialElement>();
if (studyElements != null) {
for (DicomSpecialElement dicom : studyElements) {
- if (seriesUID != null && "KO".equals(dicom.getTagValue(TagW.Modality))) { //$NON-NLS-1$
+ if (dicom != null && seriesUID != null && "KO".equals(dicom.getTagValue(TagW.Modality))) { //$NON-NLS-1$
DicomElement seq = (DicomElement) dicom.getTagValue(TagW.CurrentRequestedProcedureEvidenceSequence);
if (seq != null && seq.vr() == VR.SQ) {
for (int i = 0; i < seq.countItems(); ++i) {
@@ -127,7 +127,7 @@ public void dispose() {
List<DicomSpecialElement> filteredList = new ArrayList<DicomSpecialElement>();
if (studyElements != null) {
for (DicomSpecialElement dicom : studyElements) {
- if (seriesUID != null && "PR".equals(dicom.getTagValue(TagW.Modality))) { //$NON-NLS-1$
+ if (dicom != null && seriesUID != null && "PR".equals(dicom.getTagValue(TagW.Modality))) { //$NON-NLS-1$
DicomElement seq = (DicomElement) dicom.getTagValue(TagW.ReferencedSeriesSequence);
if (seq != null && seq.vr() == VR.SQ) {
for (int i = 0; i < seq.countItems(); ++i) {

0 comments on commit 8fbd536

Please sign in to comment.
Something went wrong with that request. Please try again.