Index: trunk/psphot/src/psphotDeblendSatstars.c
===================================================================
--- trunk/psphot/src/psphotDeblendSatstars.c	(revision 34704)
+++ trunk/psphot/src/psphotDeblendSatstars.c	(revision 34708)
@@ -498,5 +498,5 @@
     psStatsInit (fluxStats);
 
-    while (logR->data.F32[bin] < lRmax) {
+    while (bin < logR->n && logR->data.F32[bin] < lRmax) {
       if (isfinite(flux->data.F32[bin])) {
 	  psVectorAppend (fluxVals, flux->data.F32[bin]);
