[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm

raeburn raeburn@source.lon-capa.org
Wed, 17 Nov 2010 22:46:27 -0000


raeburn		Wed Nov 17 22:46:27 2010 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - Bug 6396. Check NAV_HASH lookups in &navHash() are on an object.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.450 loncom/interface/lonnavmaps.pm:1.451
--- loncom/interface/lonnavmaps.pm:1.450	Thu Aug 12 16:03:24 2010
+++ loncom/interface/lonnavmaps.pm	Wed Nov 17 22:46:27 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.450 2010/08/12 16:03:24 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.451 2010/11/17 22:46:27 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -3465,7 +3465,7 @@
     my $param = shift;
     my $id = shift;
     my $arg = $param . ($id?$self->{ID}:"");
-    if (defined($arg)) {
+    if (ref($self) && ref($self->{NAV_MAP}) && defined($arg)) {
         return $self->{NAV_MAP}->navhash($arg);
     }
     return;