Index: /tags/ipp-20121026/psphot/src/psphotDeblendSatstars.c
===================================================================
--- /tags/ipp-20121026/psphot/src/psphotDeblendSatstars.c	(revision 34708)
+++ /tags/ipp-20121026/psphot/src/psphotDeblendSatstars.c	(revision 34709)
@@ -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]);
