Index: branches/pap/psphot/src/psphotRadialProfileByAngles.c
===================================================================
--- branches/pap/psphot/src/psphotRadialProfileByAngles.c	(revision 27708)
+++ branches/pap/psphot/src/psphotRadialProfileByAngles.c	(revision 28003)
@@ -12,9 +12,14 @@
 bool psphotRadialProfilesByAngles (pmSource *source, int Nsec, float Rmax) {
 
+    psAssert (source->extpars, "define extpars");
+
     // we want to have an even number of sectors so we can do 180 deg symmetrizing
     Nsec = (Nsec % 2) ? Nsec + 1 : Nsec;
     float dtheta = 2.0*M_PI / Nsec;
 
-    pmSourceRadialProfile *profile = source->extpars->profile;
+    if (!source->extpars->radFlux) {
+	source->extpars->radFlux = pmSourceRadialFluxAlloc();
+    }
+    pmSourceRadialFlux *profile = source->extpars->radFlux;
     psFree(profile->radii);
     psFree(profile->fluxes);
@@ -24,5 +29,4 @@
     profile->fluxes = psArrayAllocEmpty(Nsec);
     profile->theta = psVectorAllocEmpty(Nsec, PS_TYPE_F32);
-
 
     for (int i = 0; i < Nsec; i++) {
