diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-12-14 17:12:54 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-12-14 17:12:54 (GMT) |
commit | c18918976d098c542e4675ddebe5b59525277525 (patch) | |
tree | 5c55b9018644b794c450aa38d9658483d3d971a8 /tksao/frame | |
parent | 3e59fd7f2b55b60efd3c8deadffd15c8b7d68e53 (diff) | |
download | blt-c18918976d098c542e4675ddebe5b59525277525.zip blt-c18918976d098c542e4675ddebe5b59525277525.tar.gz blt-c18918976d098c542e4675ddebe5b59525277525.tar.bz2 |
avoid segv
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/grid25d.C | 11 | ||||
-rw-r--r-- | tksao/frame/grid25d.h | 2 | ||||
-rw-r--r-- | tksao/frame/grid2d.C | 11 | ||||
-rw-r--r-- | tksao/frame/grid2d.h | 2 | ||||
-rw-r--r-- | tksao/frame/grid3d.C | 9 | ||||
-rw-r--r-- | tksao/frame/grid3d.h | 2 |
6 files changed, 17 insertions, 20 deletions
diff --git a/tksao/frame/grid25d.C b/tksao/frame/grid25d.C index 53712fa..7d4d039 100644 --- a/tksao/frame/grid25d.C +++ b/tksao/frame/grid25d.C @@ -19,7 +19,7 @@ Grid25d::Grid25d(Widget* p, Coord::CoordSystem sys, Coord::SkyFrame sky, Grid25d::~Grid25d() {} -int Grid25d::doit(RenderMode rm) +void Grid25d::doit(RenderMode rm) { Frame3dBase* pp = (Frame3dBase*)parent_; astGrid25dPtr =NULL; @@ -32,7 +32,7 @@ int Grid25d::doit(RenderMode rm) Context* context = pp->keyContext; FitsImage* fits = context->fits; if (!fits) - return 1; + return; astClearStatus; // just to make sure astBegin; // start memory management @@ -58,13 +58,13 @@ int Grid25d::doit(RenderMode rm) // ast_ maybe NULL if (!fits->ast_) { astEnd; // now, clean up memory - return 1; + return; } // set desired skyformat if (!fits->wcsInv()) { astEnd; // now, clean up memory - return 1; + return; } AstFrameSet* ast = (AstFrameSet*)astCopy(fits->ast_); @@ -77,7 +77,7 @@ int Grid25d::doit(RenderMode rm) case 1: // error astEnd; // now, clean up memory - return 0; + return; case 2: break; case 3: @@ -133,7 +133,6 @@ int Grid25d::doit(RenderMode rm) astEnd; // now, clean up memory astGrid25dPtr =NULL; - return 1; } void Grid25d::matrixMap(void* frameSet, Matrix& mx, const char* str) diff --git a/tksao/frame/grid25d.h b/tksao/frame/grid25d.h index 269197e..61b1389 100644 --- a/tksao/frame/grid25d.h +++ b/tksao/frame/grid25d.h @@ -12,7 +12,7 @@ class Grid25d : public Grid, public Grid25dBase { private: void matrixMap(void*, Matrix&, const char*); - int doit(RenderMode); + void doit(RenderMode); public: Grid25d(Widget*, Coord::CoordSystem, Coord::SkyFrame, diff --git a/tksao/frame/grid2d.C b/tksao/frame/grid2d.C index 499e4d0..cafd702 100644 --- a/tksao/frame/grid2d.C +++ b/tksao/frame/grid2d.C @@ -19,7 +19,7 @@ Grid2d::Grid2d(Widget* p, Coord::CoordSystem sys, Coord::SkyFrame sky, Grid2d::~Grid2d() {} -int Grid2d::doit(RenderMode rm) +void Grid2d::doit(RenderMode rm) { FrameBase* pp = (FrameBase*)parent_; astGrid2dPtr =NULL; @@ -32,7 +32,7 @@ int Grid2d::doit(RenderMode rm) Context* context = pp->keyContext; FitsImage* fits = context->fits; if (!fits) - return 1; + return; astClearStatus; // just to make sure astBegin; // start memory management @@ -58,13 +58,13 @@ int Grid2d::doit(RenderMode rm) // ast_ maybe NULL if (!fits->ast_) { astEnd; // now, clean up memory - return 1; + return; } // set desired skyformat if (!fits->wcsInv()) { astEnd; // now, clean up memory - return 1; + return; } AstFrameSet* ast = (AstFrameSet*)astCopy(fits->ast_); @@ -77,7 +77,7 @@ int Grid2d::doit(RenderMode rm) case 1: // error astEnd; // now, clean up memory - return 0; + return; case 2: break; case 3: @@ -154,7 +154,6 @@ int Grid2d::doit(RenderMode rm) astEnd; // now, clean up memory astGrid2dPtr =NULL; - return 1; } void Grid2d::matrixMap(void* frameSet, Matrix& mx, const char* str) diff --git a/tksao/frame/grid2d.h b/tksao/frame/grid2d.h index 6b093a0..52b4328 100644 --- a/tksao/frame/grid2d.h +++ b/tksao/frame/grid2d.h @@ -12,7 +12,7 @@ class Grid2d : public Grid, public Grid2dBase { private: void matrixMap(void*, Matrix&, const char*); - int doit(RenderMode); + void doit(RenderMode); public: Grid2d(Widget*, Coord::CoordSystem, Coord::SkyFrame, diff --git a/tksao/frame/grid3d.C b/tksao/frame/grid3d.C index 91cfb69..877a457 100644 --- a/tksao/frame/grid3d.C +++ b/tksao/frame/grid3d.C @@ -19,7 +19,7 @@ Grid3d::Grid3d(Widget* p, Coord::CoordSystem sys, Coord::SkyFrame sky, Grid3d::~Grid3d() {} -int Grid3d::doit(RenderMode rm) +void Grid3d::doit(RenderMode rm) { Frame3dBase* pp = (Frame3dBase*)parent_; astGrid3dPtr =NULL; @@ -41,7 +41,7 @@ int Grid3d::doit(RenderMode rm) Context* context = pp->keyContext; FitsImage* fits = context->fits; if (!fits) - return 1; + return; astClearStatus; // just to make sure astBegin; // start memory management @@ -60,12 +60,12 @@ int Grid3d::doit(RenderMode rm) // ast_ maybe NULL if (!fits->ast_) { astEnd; // now, clean up memory - return 1; + return; } if (!fits->wcsInv()) { astEnd; // now, clean up memory - return 1; + return; } AstFrameSet* ast = (AstFrameSet*)astCopy(fits->ast_); @@ -151,7 +151,6 @@ int Grid3d::doit(RenderMode rm) astEnd; // now, clean up memory astGrid3dPtr =NULL; - return 1; } void Grid3d::matrixMap(void* frameSet, Matrix3d& mx, const char* str) diff --git a/tksao/frame/grid3d.h b/tksao/frame/grid3d.h index 642df14..f8af24b 100644 --- a/tksao/frame/grid3d.h +++ b/tksao/frame/grid3d.h @@ -12,7 +12,7 @@ class Grid3d : public Grid, public Grid3dBase { private: void matrixMap(void*, Matrix3d&, const char*); - int doit(RenderMode); + void doit(RenderMode); public: Grid3d(Widget*, Coord::CoordSystem, Coord::SkyFrame, |