Index: branches/tap_branches/psphot/src/psphotRadiiFromProfiles.c
===================================================================
--- branches/tap_branches/psphot/src/psphotRadiiFromProfiles.c	(revision 25900)
+++ branches/tap_branches/psphot/src/psphotRadiiFromProfiles.c	(revision 27838)
@@ -5,5 +5,9 @@
 bool psphotRadiiFromProfiles (pmSource *source, float fluxMin, float fluxMax) {
 
-    pmSourceRadialProfile *profile = source->extpars->profile;
+    psAssert (source, "missing source");
+    psAssert (source->extpars, "missing extpars");
+    psAssert (source->extpars->radFlux, "missing radFlux");
+
+    pmSourceRadialFlux *profile = source->extpars->radFlux;
 
     psFree(profile->isophotalRadii);
@@ -146,5 +150,5 @@
 
     // show the results
-    // psphotPetrosianVisualProfileRadii (radius, flux, radiusBinned, fluxBinned, Ro);
+    // psphotPetrosianVisualProfileRadii (radius, flux, radiusBinned, fluxBinned, fluxMax, Ro);
 
     psFree(fluxBinned);
@@ -152,2 +156,5 @@
     return Ro;
 }
+
+
+
