From d36bd6977bdcad10c871271f96e59dec46a85101 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 30 Jul 2019 13:00:30 +0200 Subject: [PATCH] fixed crash on displaying Rugs in inventory in 3D geometries --- graph.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graph.cpp b/graph.cpp index 072e5273..a59e59c2 100644 --- a/graph.cpp +++ b/graph.cpp @@ -959,12 +959,15 @@ bool drawItemType(eItem it, cell *c, const transmatrix& V, color_t icol, int pti qfi.fshape = &cgi.shMFloor4; draw_shapevec(c, V2 * zpush(-h/20), qfi.fshape->levels[0], 0xFFD500FF, PPR::WALL); } - else if(WDIM == 3) { + else if(WDIM == 3 && c) { transmatrix V2 = Vit * spin(ticks / 1500.); draw_floorshape(c, V2 * zpush(h/100), cgi.shMFloor3, 0xFFD500FF); draw_floorshape(c, V2 * zpush(h/50), cgi.shMFloor4, darkena(icol, 0, 0xFF)); queuepoly(V2, cgi.shGem[ct6], 0xFFD500FF); } + else if(WDIM == 3 && !c) { + queuepoly(Vit, cgi.shGem[ct6], 0xFFD500FF); + } else #endif {