diff --git a/node_gallery.module b/node_gallery.module
index b6fc290..2025b9c 100644
--- a/node_gallery.module
+++ b/node_gallery.module
@@ -1332,6 +1332,10 @@ function node_gallery_set_user_breadcrumb($uid, $node = NULL) {
  *   accessible by the current user.
  */
 function node_gallery_set_breadcrumb($trail, $node = NULL) {
+  if (!variable_get('node_gallery_manage_breadcrumbs', TRUE)) {
+    return;
+  }
+  
   $crumbs = array();
   static $menu_title_cache = array();
 
