From 2746af158122bac5f980b4c8b54b90d80de116f8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 26 Jan 2018 18:41:09 +0000 Subject: [PATCH] Fix allocation logic for allocatable array sw. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8436 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/plotsave.f90 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/plotsave.f90 b/lib/plotsave.f90 index 8a62161b4..5c34a3063 100644 --- a/lib/plotsave.f90 +++ b/lib/plotsave.f90 @@ -7,10 +7,10 @@ subroutine plotsave(swide,nw,nh,irow) if(irow.eq.-99) then if(allocated(sw)) deallocate(sw) - return + go to 900 endif - if(nw.ne.nw0 .or. nh.ne.nh0) then + if(nw.ne.nw0 .or. nh.ne.nh0 .or. (.not.allocated(sw))) then if(allocated(sw)) deallocate(sw) ! if(nw0.ne.-1) deallocate(sw) allocate(sw(0:nw-1,0:nh-1)) @@ -18,7 +18,6 @@ subroutine plotsave(swide,nw,nh,irow) nw0=nw nh0=nh endif - df=12000.0/16384 if(irow.lt.0) then ! Push a new row of data into sw @@ -31,5 +30,5 @@ subroutine plotsave(swide,nw,nh,irow) swide=sw(0:nw-1,irow) endif - return +900 return end subroutine plotsave