summaryrefslogtreecommitdiffstats
path: root/tksao/frame/grid25d.C
diff options
context:
space:
mode:
Diffstat (limited to 'tksao/frame/grid25d.C')
-rw-r--r--tksao/frame/grid25d.C11
1 files changed, 5 insertions, 6 deletions
diff --git a/tksao/frame/grid25d.C b/tksao/frame/grid25d.C
index 3268eba..fbf0f28 100644
--- a/tksao/frame/grid25d.C
+++ b/tksao/frame/grid25d.C
@@ -36,11 +36,6 @@ int Grid25d::doit(RenderMode rm)
if (!fits)
return 1;
-#ifdef NEWWCS
- if (!fits->astInv())
- return 1;
-#endif
-
astClearStatus; // just to make sure
astBegin; // start memory management
@@ -62,12 +57,16 @@ int Grid25d::doit(RenderMode rm)
break;
default:
{
-
// set desired skyformat
#ifndef NEWWCS
AstFrameSet* ast = (AstFrameSet*)astCopy(fits->getAST(system_));
fits->setWCSSkyFrame(ast, sky_);
#else
+ if (!fits->astInv()) {
+ astEnd; // now, clean up memory
+ return 1;
+ }
+
fits->setWCSSkyFrame(system_, sky_);
AstFrameSet* ast = fits->wcsCopy();