]> git.lizzy.rs Git - irrlicht.git/blobdiff - include/irrArray.h
Support GLES2
[irrlicht.git] / include / irrArray.h
index dbad8c872a33eb386c3069dee9da784b7d7a426d..f94cfb0250e1da746de4e84677a3c13fbb9df844 100644 (file)
@@ -227,7 +227,7 @@ public:
        /** \return Pointer to the array. */\r
        T* pointer()\r
        {\r
-               return &m_data[0];\r
+               return m_data.empty() ? nullptr : &m_data[0];\r
        }\r
 \r
 \r
@@ -235,7 +235,7 @@ public:
        /** \return Pointer to the array. */\r
        const T* const_pointer() const\r
        {\r
-               return &m_data[0];\r
+               return m_data.empty() ? nullptr : &m_data[0];\r
        }\r
 \r
 \r
@@ -394,7 +394,7 @@ public:
        {\r
                if (index >= m_data.size() || count < 1)\r
                        return;\r
-               count = std::min(count, (s32)m_data.size() - (s32)index);\r
+               count = core::min_(count, (s32)m_data.size() - (s32)index);\r
                auto first = std::next(m_data.begin(), index);\r
                auto last = std::next(first, count);\r
                m_data.erase(first, last);\r