[dia] [scan-build] Division by zero (not really)
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dia] [scan-build] Division by zero (not really)
- Date: Sun, 6 Dec 2009 19:02:55 +0000 (UTC)
commit 9248aa802ff93a8e78d012e9f6ba8ab789b86065
Author: Hans Breuer <hans breuer org>
Date: Sun Dec 6 16:15:49 2009 +0100
[scan-build] Division by zero (not really)
Check another pathologic case - having at leat one layer is
as guaranteed as dia->data->active_layer!=NULL
app/undo.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/app/undo.c b/app/undo.c
index 9a3d634..4b30667 100644
--- a/app/undo.c
+++ b/app/undo.c
@@ -1214,6 +1214,7 @@ move_object_layer_relative(Diagram *dia, GList *objects, gint dist)
guint pos;
g_return_if_fail(dia->data->active_layer);
+ g_return_if_fail(dia->data->layers->len != 0);
active = dia->data->active_layer;
for (pos = 0; pos < dia->data->layers->len; ++pos)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]