sim.c: Fix NULL pointer dereference found by clang.
drwxr-xr-x - doc
drwxr-xr-x - include
drwxr-xr-x - src