summaryrefslogtreecommitdiff
path: root/src/getsuyomi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/getsuyomi.cpp')
-rw-r--r--src/getsuyomi.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/getsuyomi.cpp b/src/getsuyomi.cpp
index 11f273b..5593758 100644
--- a/src/getsuyomi.cpp
+++ b/src/getsuyomi.cpp
@@ -13,6 +13,12 @@ Getsuyomi::Getsuyomi()
setLayout(m_layout);
}
+Getsuyomi::~Getsuyomi() {
+ if (m_archive != nullptr) {
+ delete m_archive;
+ }
+}
+
void Getsuyomi::setArchive(Archive* archive) {
if (archive == m_archive) {
return;
@@ -38,7 +44,7 @@ void Getsuyomi::next() {
}
void Getsuyomi::back() {
- auto numPages = m_archive->numPages();
+ // auto numPages = m_archive->numPages();
size_t decrement = 1;
if (m_pageLayout != PageLayout::Single) {
decrement = 2;