Index: ad_image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ad/image/ad_image.module,v
retrieving revision 1.2.2.13.2.19
diff -u -r1.2.2.13.2.19 ad_image.module
--- ad_image.module	8 Jun 2007 14:13:11 -0000	1.2.2.13.2.19
+++ ad_image.module	12 Jul 2007 15:41:50 -0000
@@ -280,6 +280,10 @@
     // TODO: Detect if new terms have been set, and if so validate against
     // them, not the old ones.  See what's in $edit['taxonomy'].
     $terms = module_invoke('taxonomy', 'node_get_terms', $nid);
+    if (count($terms) == 0) {
+      // We need at least a single (NULL) term to be ensure we still get the default image size
+      $terms[] = NULL;
+    } 
     foreach ($terms as $tid => $term) {
       $format = ad_image_format_load($tid);
       list($size->width, $size->height) = getimagesize($file->filepath);
