From 2575917d3b12db865b6b2e77cc0cbbe5181de6bd Mon Sep 17 00:00:00 2001 From: "Malcolm J. Currie" Date: Wed, 13 Aug 2014 22:04:56 -1000 Subject: [PATCH] KAPPA: Protect against an abort for one of the parameters in MSTATS. --- applications/kappa/libkappa/mstats.f | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/kappa/libkappa/mstats.f b/applications/kappa/libkappa/mstats.f index df0fe655285..fe0026aaf0d 100644 --- a/applications/kappa/libkappa/mstats.f +++ b/applications/kappa/libkappa/mstats.f @@ -338,7 +338,9 @@ SUBROUTINE MSTATS( STATUS ) * 2014 August 13 (MJC): * Call KPS1_MSAGx separately for Data and Variance as this * routine only processes one array component at a time. -* This preserves the pointer to the variance array. +* This preserves the pointer to the variance array. Check for +* bad status after obtaining parameters to ensure the parameter +* values are defined before attempting to use them. * {enter_further_changes_here} *- @@ -462,6 +464,7 @@ SUBROUTINE MSTATS( STATUS ) * Get the component we require. CALL PAR_CHOIC( 'COMP', 'DATA', 'DATA,VARIANCE,QUALITY,ERROR', : .FALSE., COMP, STATUS ) + IF ( STATUS .NE. SAI__OK ) GOTO 999 * Single pixel mode. * ==================