Protect against NULL frames

Found this bug while running a simple app on puma. Here's the gdb @eric helped track down.

```
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000048
profiler_hook (event=64, data=<value temporarily unavailable, due to optimizations>, self=140532051804240, mid=<value temporarily unavailable, due to optimizations>, klass=140532051804200) at rblineprof.c:476
476	        if (frame->srcfile != prev->srcfile) {
(gdb) where
#0  profiler_hook (event=64, data=<value temporarily unavailable, due to optimizations>, self=140532051804240, mid=<value temporarily unavailable, due to optimizations>, klass=140532051804200) at rblineprof.c:476
#1  0x0000000109b36b6f in thread_exec_event_hooks ()
#2  0x0000000109b368c3 in thread_suppress_tracing ()
#3  0x0000000109b369ad in rb_threadptr_exec_event_hooks ()
#4  0x0000000109b32718 in vm_call_method ()
#5  0x0000000109b1eeb5 in vm_exec_core ()
#6  0x0000000109b23aea in vm_exec ()
#7  0x0000000109b23f60 in rb_iseq_eval ()
#8  0x00000001099eff2b in rb_load_internal ()
#9  0x00000001099f174d in rb_f_load ()
#10 0x0000000109b31a67 in vm_call_method ()
#11 0x0000000109b1eeb5 in vm_exec_core ()
#12 0x0000000109b23aea in vm_exec ()
#13 0x0000000109b23dcc in rb_iseq_eval_main ()
#14 0x00000001099ecf82 in ruby_exec_internal ()
#15 0x00000001099efaec in ruby_run_node ()
#16 0x00000001099ad89f in main ()
(gdb) p frame
$1 = (stackframe_t *) 0x0
(gdb) p prev
$2 = (stackframe_t *) 0x109e5a0c8
```