diff src/toplev.h @ 7912:75df1f0b4c9d

toplev.h (octave_call_stack::instance_ok): push top scope when creating instance
author John W. Eaton <jwe@octave.org>
date Wed, 09 Jul 2008 16:16:19 -0400
parents 3e4c9b69069d
children c3d21b9b94b6
line wrap: on
line diff
--- a/src/toplev.h	Wed Jul 09 12:28:26 2008 -0400
+++ b/src/toplev.h	Wed Jul 09 16:16:19 2008 -0400
@@ -110,13 +110,17 @@
     bool retval = true;
 
     if (! instance)
-      instance = new octave_call_stack ();
+      {
+	instance = new octave_call_stack ();
 
-    if (! instance)
-      {
-	::error ("unable to create call stack object!");
+	if (instance)
+	  instance->do_push (0, symbol_table::top_scope (), 0);
+	else
+	  {
+	    ::error ("unable to create call stack object!");
 
-	retval = false;
+	    retval = false;
+	  }
       }
 
     return retval;