]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Fix no_texture.png for unknown nodes with ID < 125 (#12329)
authorWuzzy <Wuzzy@disroot.org>
Mon, 23 May 2022 20:50:10 +0000 (20:50 +0000)
committerGitHub <noreply@github.com>
Mon, 23 May 2022 20:50:10 +0000 (22:50 +0200)
src/nodedef.h

index f90caff8aea500daa4f59271cf1edb0b3d3881dc..8c817179daa1c85464db2187ca2f97133130e19b 100644 (file)
@@ -539,7 +539,7 @@ class NodeDefManager {
         */
        inline const ContentFeatures& get(content_t c) const {
                return
-                       c < m_content_features.size() ?
+                       (c < m_content_features.size() && !m_content_features[c].name.empty()) ?
                                m_content_features[c] : m_content_features[CONTENT_UNKNOWN];
        }