aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2013-11-20 13:20:03 +0100
committerSebastian Dransfeld <sd@tango.flipp.net>2013-11-21 09:29:25 +0100
commite610047ef3ca52a69f2362702f6c2ff0f0b6a2a3 (patch)
treeed71c8212b8e53565753d75fbf013bdc09db17a7
parentevas: fixing headers order for windows build is insane. (diff)
downloadefl-e610047ef3ca52a69f2362702f6c2ff0f0b6a2a3.tar.gz
efreet: store volatile value locally before return
-rw-r--r--src/lib/efreet/efreet_desktop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_desktop.c b/src/lib/efreet/efreet_desktop.c
index 35e20e07c5..9c4c4e7fed 100644
--- a/src/lib/efreet/efreet_desktop.c
+++ b/src/lib/efreet/efreet_desktop.c
@@ -174,11 +174,14 @@ efreet_desktop_get(const char *file)
EAPI int
efreet_desktop_ref(Efreet_Desktop *desktop)
{
+ int ret;
+
EINA_SAFETY_ON_NULL_RETURN_VAL(desktop, 0);
eina_lock_take(&_lock);
desktop->ref++;
+ ret = desktop->ref;
eina_lock_release(&_lock);
- return desktop->ref;
+ return ret;
}
EAPI Efreet_Desktop *