Fix bug in is_empty() method which was making the viewer window crash.

This commit is contained in:
Jasmeet Singh 2019-07-12 10:13:51 -07:00
parent 899b6d9e09
commit 8c2f10fec6
1 changed files with 5 additions and 5 deletions

View File

@ -189,11 +189,11 @@ public:
bool is_empty() const bool is_empty() const
{ {
return return
(m_pos_buffer!=nullptr && m_pos_buffer->empty()) && (m_pos_buffer==nullptr && m_pos_buffer->empty()) &&
(m_color_buffer!=nullptr || m_color_buffer->empty()) && (m_color_buffer==nullptr || m_color_buffer->empty()) &&
(m_flat_normal_buffer!=nullptr || m_flat_normal_buffer->empty()) && (m_flat_normal_buffer==nullptr || m_flat_normal_buffer->empty()) &&
(m_gouraud_normal_buffer!=nullptr || m_gouraud_normal_buffer->empty()) && (m_gouraud_normal_buffer==nullptr || m_gouraud_normal_buffer->empty()) &&
(m_index_buffer!=nullptr || m_index_buffer->empty()); (m_index_buffer==nullptr || m_index_buffer->empty());
} }
bool has_position() const bool has_position() const