summaryrefslogtreecommitdiffstats
path: root/src/rccxml.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-06 15:42:04 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-06 15:42:04 +0000
commit232dbc756390d30a86ae6de0cc84600eddb1c0b2 (patch)
treee4aadbb4076392bcaf30cce6329dc715375a98d7 /src/rccxml.c
parent550bda3e54a0895e027fee14860f14171a357ac9 (diff)
downloadlibrcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.tar.gz
librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.tar.bz2
librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.tar.xz
librcc-232dbc756390d30a86ae6de0cc84600eddb1c0b2.zip
Recode FS Fixes
Diffstat (limited to 'src/rccxml.c')
-rw-r--r--src/rccxml.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rccxml.c b/src/rccxml.c
index f40853f..a64e759 100644
--- a/src/rccxml.c
+++ b/src/rccxml.c
@@ -216,6 +216,11 @@ int rccSave(rcc_context ctx, const char *name) {
int memsize;
xmlChar *mem;
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return -1;
+ }
+
if ((!name)||(!strcmp(name, "rcc"))||(strlen(rcc_home_dir)<3)) name = "default";
size = strlen(rcc_home_dir) + strlen(name) + 32;
@@ -371,6 +376,11 @@ int rccLoad(rcc_context ctx, const char *name) {
xmlDocPtr doc = NULL;
xmlNodePtr node, lnode;
+ if (!ctx) {
+ if (rcc_default_ctx) ctx = rcc_default_ctx;
+ else return -1;
+ }
+
if ((!name)||(!strcmp(name, "rcc"))||(strlen(rcc_home_dir)<3)) name = "default";
size = strlen(rcc_home_dir) + strlen(name) + 32;