diff --git a/src/linkage.cpp b/src/linkage.cpp index 3c7fec2..724ffa8 100644 --- a/src/linkage.cpp +++ b/src/linkage.cpp @@ -239,6 +239,11 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) { } } + // clear the graph editor upon disconnect + if (ent == graph.getEditor ()) { + graph.setEditor (nullptr); + } + if (game.is (GameFlags::Metamod)) { RETURN_META (MRES_IGNORED); }