Index: generate/project_issue_generate.inc
===================================================================
--- generate/project_issue_generate.inc	(revision 1)
+++ generate/project_issue_generate.inc	(working copy)
@@ -40,7 +40,7 @@
     $project = $projects[array_rand($projects)];
     $project_node = node_load($project->nid);
     $components = unserialize($project->components);
-    $releases = project_release_get_releases($project_node, FALSE);
+    
     $issue = array();
     $issue['pid'] = $project->nid;
     $issue['category'] = $categories[array_rand($categories)];
@@ -48,7 +48,11 @@
     $issue['priority'] = array_rand($priorities);
     $issue['title'] = devel_create_greeking(rand(2, 15), true);
     $issue['body'] = devel_create_content();
-    $issue['rid'] = array_rand($releases);
+    
+	if (module_exists('project_release')) {
+	  $releases = project_release_get_releases($project_node, FALSE);
+	  $issue['rid'] = array_rand($releases);
+	}
 
     // The user must be chosen before status (sid) so that we can make sure
     // that the status is set such that the user would have permission to
@@ -112,10 +116,13 @@
     $project = $projects[array_rand($projects)];
     if (rand(0, 1)) {
       $issues[$k]->pid = $project->nid;
-      // If the project changes, the version must also change.
       $project_node = node_load($issues[$k]->pid, NULL, TRUE);
-      $releases = project_release_get_releases($project_node, FALSE);
-      $issues[$k]->rid = array_rand($releases);
+	  
+	  if (module_exists('project_release')) {
+	    // If the project changes, the version must also change.        
+        $releases = project_release_get_releases($project_node, FALSE);
+        $issues[$k]->rid = array_rand($releases);
+	  }
 
       // And so must the component.
       $components = $project_node->components;
@@ -141,7 +148,8 @@
         continue;
       }
     }
-    if (rand(0, 1)) {
+    
+	if (rand(0, 1) && module_exists('project_release')) {
       $project_node = node_load($issues[$k]->pid, NULL, TRUE);
       $releases = project_release_get_releases($project_node, FALSE);
       $issues[$k]->rid = array_rand($releases);
