In dirgraph_create
dirgraph_t graph

non hai allocato la struttura prima di usarla.

E nel main dovresti impostare a NULL il puntatore

dirgraph_t graph;