Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_entry.c 


Log Message:
Patch from Andrew Hanson to fix warnings when deleting or backspacing with empty
text.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_entry.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- ewl_entry.c 3 Jul 2006 00:37:43 -0000       1.61
+++ ewl_entry.c 15 Aug 2006 20:46:33 -0000      1.62
@@ -629,7 +629,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("e", e);
        DCHECK_TYPE("e", e, EWL_ENTRY_TYPE);
-
+       if(!EWL_TEXT(e)->text)
+               DRETURN(DLEVEL_STABLE); 
        pos1 = ewl_entry_cursor_position_get(EWL_ENTRY_CURSOR(e->cursor));
        pos2 = ewl_text_utf_char_position_prev(EWL_TEXT(e)->text, pos1);
        ewl_entry_cursor_position_set(EWL_ENTRY_CURSOR(e->cursor), pos2);
@@ -651,7 +652,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("e", e);
        DCHECK_TYPE("e", e, EWL_ENTRY_TYPE);
-
+       if(!EWL_TEXT(e)->text)
+               DRETURN(DLEVEL_STABLE);
        pos1 = ewl_entry_cursor_position_get(EWL_ENTRY_CURSOR(e->cursor));
        pos2 = ewl_text_utf_char_position_next(EWL_TEXT(e)->text, pos1);
        ewl_text_text_delete(EWL_TEXT(e), pos2 - pos1);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to