[gimp] app: avoid CRITICAL when moving empty floating selection



commit bf8b2f2e6b3ce08dae2ad9e35ec4010f52fef949
Author: Ell <ell_se yahoo com>
Date:   Thu Dec 7 08:38:22 2017 -0500

    app: avoid CRITICAL when moving empty floating selection

 app/tools/gimpeditselectiontool.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpeditselectiontool.c b/app/tools/gimpeditselectiontool.c
index e50d10a..a3d2ea1 100644
--- a/app/tools/gimpeditselectiontool.c
+++ b/app/tools/gimpeditselectiontool.c
@@ -764,12 +764,15 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
       break;
 
     case GIMP_TRANSLATE_MODE_FLOATING_SEL:
-      gimp_draw_tool_add_boundary (draw_tool,
-                                   edit_select->segs_in,
-                                   edit_select->num_segs_in,
-                                   NULL,
-                                   edit_select->cuml_x,
-                                   edit_select->cuml_y);
+      if (edit_select->segs_in)
+        {
+          gimp_draw_tool_add_boundary (draw_tool,
+                                       edit_select->segs_in,
+                                       edit_select->num_segs_in,
+                                       NULL,
+                                       edit_select->cuml_x,
+                                       edit_select->cuml_y);
+        }
       break;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]