summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-08-29 00:19:16 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-08-29 23:36:28 -0300
commit6c1da9d452633f85bd056c35f88207a6a1e5e337 (patch)
tree1a0ff783d836a6053326d1d1258ff950d197ef2e
parent2d22c2f9ba7dd94748290e86622bae1eba3fd5ff (diff)
emix: Shutdown the module before set another
-rw-r--r--src/lib/emix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/emix.c b/src/lib/emix.c
index 589a844..8f40e1c 100644
--- a/src/lib/emix.c
+++ b/src/lib/emix.c
@@ -255,6 +255,12 @@ emix_backend_set(const char *backend)
255 Eina_Module *module; 255 Eina_Module *module;
256 256
257 EINA_SAFETY_ON_FALSE_RETURN_VAL((ctx && backend), EINA_FALSE); 257 EINA_SAFETY_ON_FALSE_RETURN_VAL((ctx && backend), EINA_FALSE);
258 if (ctx->loaded && ctx->loaded->ebackend_shutdown)
259 {
260 ctx->loaded->ebackend_shutdown();
261 ctx->loaded = NULL;
262 }
263
258 EINA_LIST_FOREACH(ctx->backends_names, l, name) 264 EINA_LIST_FOREACH(ctx->backends_names, l, name)
259 { 265 {
260 if (!strncmp(name, backend, strlen(name))) 266 if (!strncmp(name, backend, strlen(name)))