Index: xmlsitemap_node/xmlsitemap_node.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module,v
retrieving revision 1.19.2.20
diff -u -p -r1.19.2.20 xmlsitemap_node.module
--- xmlsitemap_node/xmlsitemap_node.module	1 Jan 2009 16:06:27 -0000	1.19.2.20
+++ xmlsitemap_node/xmlsitemap_node.module	26 Jan 2009 17:34:27 -0000
@@ -340,7 +340,10 @@ function xmlsitemap_node_priority($node)
     $priority += variable_get('xmlsitemap_node_promote_priority', 0.3);
   }
   if ($maxcomments != 1) {
-    $priority += $node->comment_count / $maxcomments * variable_get('xmlsitemap_node_comment_priority', 0.2);
+    $divisor = $maxcomments * variable_get('xmlsitemap_node_comment_priority', 0.2);
+    if ($divisor) {
+      $priority += $node->comment_count / $divisor;
+    }
   }
   $priority = min(round($priority, 1), 1);
   return $priority;
