Index: admin_dashboard.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_dashboard/admin_dashboard.admin.inc,v
retrieving revision 1.2
diff -u -p -r1.2 admin_dashboard.admin.inc
--- admin_dashboard.admin.inc	9 Sep 2010 07:53:03 -0000	1.2
+++ admin_dashboard.admin.inc	29 Oct 2010 20:34:20 -0000
@@ -160,19 +160,20 @@ function admin_dashboard_menu_rebuild(&$
   
     // Get the menu id of the parent menu item ('node/add').
     $plid = db_result(db_query("SELECT mlid FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s'", $menu_name, 'node/add'));
-  
-    foreach (node_get_types() as $key => $type) {
-      // Prepare a menu item and fill it with default values.
-      $item = array(
-        'menu_name' => $menu_name,
-        'plid' => $plid,
-        'link_path' => 'node/add/'. str_replace('_', '-', $key),
-        'link_title' => $type->name,
-        'options' => array(
-          'attributes' => array('title' => $type->description),
-        ),
-      );
-      menu_link_save($item);
+    if ($plid) {
+      foreach (node_get_types() as $key => $type) {
+        // Prepare a menu item and fill it with default values.
+        $item = array(
+          'menu_name' => $menu_name,
+          'plid' => $plid,
+          'link_path' => 'node/add/'. str_replace('_', '-', $key),
+          'link_title' => $type->name,
+          'options' => array(
+            'attributes' => array('title' => $type->description),
+          ),
+        );
+        menu_link_save($item);
+      }
     }
   }
 }
