[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-331-g9509f1654

wwp at claws-mail.org wwp at claws-mail.org
Fri Oct 8 13:51:09 CET 2021


The branch, gtk3 has been updated
       via  9509f16541b77f049a8af8c9ff508a68d316adf4 (commit)
      from  699bae8428d97cfbb64cd38b05940ad2cfc771df (commit)

Summary of changes:
 src/gtk/gtkutils.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 9509f16541b77f049a8af8c9ff508a68d316adf4
Author: wwp <subscript at free.fr>
Date:   Fri Oct 8 15:50:39 2021 +0200

    Fix CID 1491401 and 1491402: (possible) modulo by zero.

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c
index 5a2c4a97c..ccc72da1d 100644
--- a/src/gtk/gtkutils.c
+++ b/src/gtk/gtkutils.c
@@ -602,8 +602,8 @@ void gtkut_window_popup(GtkWidget *window)
 	gdk_monitor_get_workarea(gdk_display_get_primary_monitor(gdk_display_get_default()),
 				 &workarea);
 
-	sx = workarea.width;
-	sy = workarea.height;
+	sx = MAX(1, workarea.width);
+	sy = MAX(1, workarea.height);
 
 	gdk_window_get_origin(gdkwin, &x, &y);
 	new_x = x % sx; if (new_x < 0) new_x = 0;
@@ -630,8 +630,8 @@ void gtkut_widget_get_uposition(GtkWidget *widget, gint *px, gint *py)
 	gdk_monitor_get_workarea(gdk_display_get_primary_monitor(gdk_display_get_default()),
 				 &workarea);
 
-	sx = workarea.width;
-	sy = workarea.height;
+	sx = MAX(1, workarea.width);
+	sy = MAX(1, workarea.height);
 
 	/* gdk_window_get_root_origin ever return *rootwindow*'s position */
 	gdk_window_get_root_origin(gdkwin, &x, &y);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list