talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit ce587ea1692033ed418e30ca2ce3e1de29af92f3
parent 96c3d0eb96a643630d5fc44943d6553887e6b8b2
Author: Jonathan Boeing <jonathan@claws-mail.org>
Date:   Sat, 20 Nov 2021 22:51:09 -0700

Fix -Wmaybe-uninitialized warnings

Diffstat:
Msrc/plugins/litehtml_viewer/lh_widget.cpp | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -237,6 +237,7 @@ void lh_widget::redraw() cairo_t *cr; cairo_region_t *creg; GdkDrawingContext *gdkctx; + gboolean destroy = FALSE; if (m_html == NULL) return; @@ -278,6 +279,7 @@ void lh_widget::redraw() creg = cairo_region_create_rectangle(&rect); gdkctx = gdk_window_begin_draw_frame(gdkwin, creg); cr = gdk_drawing_context_get_cairo_context(gdkctx); + destroy = TRUE; } if(!std::atomic_exchange(&m_blank, false)) { @@ -289,7 +291,7 @@ void lh_widget::redraw() } /* Only destroy the used cairo context if we created it earlier. */ - if (m_cairo_context == NULL) { + if (destroy) { gdk_window_end_draw_frame(gdkwin, gdkctx); cairo_region_destroy(creg); }