tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=344f17a03de8799b5b6008f11008bb079a8fac67

commit 344f17a03de8799b5b6008f11008bb079a8fac67
Author: MinJeong Kim <minjjj....@samsung.com>
Date:   Thu May 21 08:48:56 2015 +0100

    evas_object_textblock: fix dereference before null check
    
    Summary:
    Fix coverity CID 1270031 Dereference before null check
    @fix
    
    Reviewers: devilhorns, zmike, raster, tasn
    
    Reviewed By: tasn
    
    Subscribers: tasn, cedric
    
    Differential Revision: https://phab.enlightenment.org/D2522
---
 src/lib/evas/canvas/evas_object_textblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index a2d7079..6cf2648 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -7163,9 +7163,9 @@ evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
 EAPI Eina_Bool
 evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
 {
+   if ((!cur) || (!cur->node)) return EINA_FALSE;
    Evas_Object_Protected_Data *obj = eo_data_scope_get(cur->obj, 
EVAS_OBJECT_CLASS);
    evas_object_async_block(obj);
-   if (!cur || !cur->node) return EINA_FALSE;
    return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ?
       EINA_TRUE : EINA_FALSE;
 }

-- 


Reply via email to