[atk] text: atk_text_get_range_extents should use g_return_if_fail



commit 24e4f2db1228d3a003d3c25685de499e1e57c482
Author: Yue Wang <yue wang sun com>
Date:   Tue Dec 10 17:58:56 2013 +0100

    text: atk_text_get_range_extents should use g_return_if_fail
    
    https://bugzilla.gnome.org/show_bug.cgi?id=572489

 atk/atktext.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/atk/atktext.c b/atk/atktext.c
index d142c9a..9abb7f4 100755
--- a/atk/atktext.c
+++ b/atk/atktext.c
@@ -1066,10 +1066,8 @@ atk_text_get_range_extents (AtkText          *text,
 
   g_return_if_fail (ATK_IS_TEXT (text));
   g_return_if_fail (rect);
+  g_return_if_fail (start_offset >= 0 && start_offset < end_offset);
 
-  if (start_offset < 0 || start_offset >= end_offset)
-    return;
- 
   iface = ATK_TEXT_GET_IFACE (text);
 
   if (iface->get_range_extents)


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