summary refs log tree commit diff
path: root/src/Binder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Binder.cpp')
-rw-r--r--src/Binder.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Binder.cpp b/src/Binder.cpp
index 9bca480..d013f08 100644
--- a/src/Binder.cpp
+++ b/src/Binder.cpp
@@ -6,7 +6,9 @@ namespace MC {
 
 BindableMesh Binder::load(Mesh& mesh) {
     auto vao = create_vao();
-    store_indices(mesh.raw_indices(), mesh.indices_size());
+    if (mesh.indices_size() > 0) {
+        store_indices(mesh.raw_indices(), mesh.indices_size());
+    }
     store_in_attribute_list(0, 3, mesh.raw(), mesh.size() * 3);
     store_in_attribute_list(1, 2, mesh.raw_tex_coords(), mesh.tex_coords_size() * 2);
     unbind_vao();