glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
int nchildren = (int)cur_node->children.size();
- int ncols = std::min(cur_node->nfiles, max_ncols);
+ int ncols = std::max(std::min(cur_node->nfiles, max_ncols), 1);
int first = start_child % ncols;
int col = 0, row = 0;