diff --git a/src/app/doc_exporter.cpp b/src/app/doc_exporter.cpp index 571e761a7..6b49ef2d0 100644 --- a/src/app/doc_exporter.cpp +++ b/src/app/doc_exporter.cpp @@ -376,14 +376,14 @@ public: else pr.pack(gfx::Size(width, height)); - auto it = samples.begin(); - for (auto& rc : pr) { - if (it->isDuplicated()) + auto it = pr.begin(); + for (auto& sample : samples) { + if (sample.isDuplicated() || + sample.isEmpty()) continue; - ASSERT(it != samples.end()); - it->setInTextureBounds(rc); - ++it; + ASSERT(it != pr.end()); + sample.setInTextureBounds(*(it++)); } } };