diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index d0f39536ad..47700b1d11 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -662,6 +662,8 @@ static bool LoadNodes (FileReader * lump) static bool DoLoadGLNodes(FileReader ** lumps) { + int missing = 0; + if (!LoadGLVertexes(lumps[0]) || !LoadGLSegs(lumps[1]) || !LoadGLSubsectors(lumps[2]) || @@ -684,7 +686,7 @@ static bool DoLoadGLNodes(FileReader ** lumps) } // check whether the BSP covers all sidedefs completely. - int missing = CheckForMissingSegs(); + missing = CheckForMissingSegs(); if (missing > 0) { Printf("%d missing segs counted in GL nodes.\nThe BSP has to be rebuilt.\n", missing);