aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkSinglyLinkedList.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pdf/SkSinglyLinkedList.h b/src/pdf/SkSinglyLinkedList.h
index c157c31d16..c7101141d6 100644
--- a/src/pdf/SkSinglyLinkedList.h
+++ b/src/pdf/SkSinglyLinkedList.h
@@ -18,6 +18,7 @@ public:
~SkSinglyLinkedList() { this->reset(); }
void reset() {
SkASSERT(fHead != nullptr || nullptr == fTail);
+ // Use a while loop rather than recursion to avoid stack overflow.
Node* node = fHead;
while (node) {
Node* next = node->fNext;