devilhorns pushed a commit to branch master.

commit f4f44c777ad410eaea152cc8745ca641ea2c2d5a
Author: Chris Michael <[email protected]>
Date:   Thu Sep 12 13:25:34 2013 +0100

    Reduce additional call to eina_stringshare_replace.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_wayland/ecore_wl_input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_input.c 
b/src/lib/ecore_wayland/ecore_wl_input.c
index 6f56e9f..8352552 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -238,11 +238,11 @@ ecore_wl_input_cursor_from_name_set(Ecore_Wl_Input 
*input, const char *cursor_na
 
    _pointer_update_stop(input);
 
-   eina_stringshare_replace(&input->cursor_name, cursor_name);
-
    /* No cursor. Set to default Left Pointer */
    if (!cursor_name) 
      eina_stringshare_replace(&input->cursor_name, "left_ptr");
+   else
+     eina_stringshare_replace(&input->cursor_name, cursor_name);
 
    /* try to get this cursor from the theme */
    if (!(cursor = ecore_wl_cursor_get(input->cursor_name)))

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk

Reply via email to