fix bug 4312, 'litehtml plugin loops (hangup)'
authorpaul <paul@claws-mail.org>
Tue, 3 Aug 2021 11:10:01 +0000 (12:10 +0100)
committerJonathan Boeing <jonathan@claws-mail.org>
Tue, 14 Sep 2021 00:22:01 +0000 (17:22 -0700)
patch by Frank Mueller

(cherry picked from commit 00d0212ccbcaa608a91c5f3a50639fed98f654c6)

src/plugins/litehtml_viewer/litehtml/html_tag.cpp

index f3524dfc93a79ca712b5002e38b440153b9218b9..9937fbbe2b565c15a978e4c0352fa51f5c9f0431 100644 (file)
@@ -4014,6 +4014,9 @@ int litehtml::html_tag::render_box(int x, int y, int max_width, bool second_pass
 {
        int parent_width = max_width;
 
+       if (max_width <= 0)
+               return 0;
+
        calc_outlines(parent_width);
 
        m_pos.clear();