From a173021c75cf9753f617f8ff64a7545f9d6ecf51 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 9 Jan 2019 10:55:12 +0200 Subject: [PATCH] - fixed crash on loading linedefs --- src/p_xlat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_xlat.cpp b/src/p_xlat.cpp index 43180153114..7b13a08ce6c 100644 --- a/src/p_xlat.cpp +++ b/src/p_xlat.cpp @@ -62,7 +62,6 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld, int lineindexforid) short tag = mld->tag; uint32_t flags =mld->flags; INTBOOL passthrough = 0; - auto Level = ld->GetLevel(); uint32_t flags1 = flags; uint32_t newflags = 0; @@ -103,6 +102,7 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld, int lineindexforid) // line also needs to have its ID set to the same as its tag. // An external conversion program would need to do this more // intelligently. + auto Level = ld->GetLevel(); Level->tagManager.AddLineID(lineindexforid, tag); } @@ -499,4 +499,4 @@ const int* (*XlatExprEval[XEXP_COUNT])(int *dest, const int *xnode, FXlatExprSta Expr_Or, Expr_Xor, Expr_Neg -}; \ No newline at end of file +};