diff --git a/src/stojg/crop/CropBalanced.php b/src/stojg/crop/CropBalanced.php
index <HASH>..<HASH> 100644
--- a/src/stojg/crop/CropBalanced.php
+++ b/src/stojg/crop/CropBalanced.php
@@ -100,11 +100,15 @@ class CropBalanced extends Crop
         $centerX = 0;
         $centerY = 0;
 
-        // Calulate the mean weighted center x and y
-        $totalPoints = count($points);
-        for ($idx=0; $idx < $totalPoints; $idx++) {
-            $centerX += $points[$idx]['x'] * ($points[$idx]['sum'] / $totalWeight);
-            $centerY += $points[$idx]['y'] * ($points[$idx]['sum'] / $totalWeight);
+        // If we found a center point, made the calculations to found the coords
+        if ($totalWeight)
+        {
+                // Calulate the mean weighted center x and y
+                $totalPoints = count($points);
+                for ($idx=0; $idx < $totalPoints; $idx++) {
+                        $centerX += $points[$idx]['x'] * ($points[$idx]['sum'] / $totalWeight);
+                        $centerY += $points[$idx]['y'] * ($points[$idx]['sum'] / $totalWeight);
+                }
         }
 
         // From the weighted center point to the topleft corner of the crop would be
fixed an error when the source image have a very plain color and it can't found the most energy point.