aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-02 16:55:30 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-02 16:55:30 +0000
commitd56cb86b3116873675ff49bf493521be6cb91a1a (patch)
treeebc6bec6c485a062bff0fea3c89a109316f3f065
parent4b51acaca526d1f42054b35a1d26b7e5a8300db2 (diff)
add assert() that ghost zone ptr is non-NULL before using it
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@420 f88db872-0e4f-0410-b76b-b9085cfa78c5
-rw-r--r--src/patch/patch.hh20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/patch/patch.hh b/src/patch/patch.hh
index f5d906c..338acf7 100644
--- a/src/patch/patch.hh
+++ b/src/patch/patch.hh
@@ -274,13 +274,25 @@ public:
//
public:
ghost_zone& min_rho_ghost_zone() const
- { return *min_rho_ghost_zone_; }
+ {
+ assert(min_rho_ghost_zone_ != NULL);
+ return *min_rho_ghost_zone_;
+ }
ghost_zone& max_rho_ghost_zone() const
- { return *max_rho_ghost_zone_; }
+ {
+ assert(max_rho_ghost_zone_ != NULL);
+ return *max_rho_ghost_zone_;
+ }
ghost_zone& min_sigma_ghost_zone() const
- { return *min_sigma_ghost_zone_; }
+ {
+ assert(min_sigma_ghost_zone_ != NULL);
+ return *min_sigma_ghost_zone_;
+ }
ghost_zone& max_sigma_ghost_zone() const
- { return *max_sigma_ghost_zone_; }
+ {
+ assert(max_sigma_ghost_zone_ != NULL);
+ return *max_sigma_ghost_zone_;
+ }
ghost_zone& minmax_ang_ghost_zone(bool want_min, bool want_rho) const;
ghost_zone& ghost_zone_on_edge(const patch_edge &edge) const;