diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-16 22:18:03 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-16 22:18:25 (GMT) |
commit | acac24dbaae205b389c81132939280295b6a5d34 (patch) | |
tree | 3bc91706e0d455ebadb19e1d25efb1bc554a9788 /src/analysis | |
parent | f6e56cebfa878dd32a2405fd0c916a40140a1ff0 (diff) |
Cleaned code.
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/loaded.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c index e65cb38..5359103 100644 --- a/src/analysis/loaded.c +++ b/src/analysis/loaded.c @@ -168,7 +168,11 @@ bool g_loaded_content_restore(GLoadedContent *content, xmlDocPtr xdoc, xmlXPathC iface = G_LOADED_CONTENT_GET_IFACE(content); - result = iface->restore(content, xdoc, context, path); + if (iface->restore != NULL) + result = iface->restore(content, xdoc, context, path); + + else + result = true; return result; @@ -197,7 +201,11 @@ bool g_loaded_content_save(const GLoadedContent *content, xmlDocPtr xdoc, xmlXPa iface = G_LOADED_CONTENT_GET_IFACE(content); - result = iface->save(content, xdoc, context, path); + if (iface->save != NULL) + result = iface->save(content, xdoc, context, path); + + else + result = true; return result; |