about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-03-06 16:23:51 -0800
committerKartik Agaram <vc@akkartik.com>2019-03-06 16:23:51 -0800
commit092cede5da0f329f2b624d31cfe76136cfc6a6ed (patch)
tree59327738c7ea2f842160bca53e1c74bf232e05ad
parent8359e5798993b4c2d2b5da7b03b38ead5c0f32ca (diff)
downloadmu-092cede5da0f329f2b624d31cfe76136cfc6a6ed.tar.gz
4995
Thanks Peter van Hardenberg for causing me to run into this crash (the
first time I tried to demo sandboxes in a long time).
-rw-r--r--101run_sandboxed.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/101run_sandboxed.cc b/101run_sandboxed.cc
index 4a897d3a..e196081f 100644
--- a/101run_sandboxed.cc
+++ b/101run_sandboxed.cc
@@ -163,7 +163,8 @@ void run_code_begin(bool should_stash_snapshots) {
   Save_callstack_depth = Callstack_depth;
   Callstack_depth = Initial_callstack_depth;
   Trace_stream = new trace_stream;
-  Trace_stream->collect_depth = Save_trace_stream->collect_depth;
+  if (Save_trace_stream)
+    Trace_stream->collect_depth = Save_trace_stream->collect_depth;
 }
 
 void run_code_end() {