summaryrefslogtreecommitdiffstats
path: root/src/rccxml.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-20 14:06:53 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-20 14:06:53 +0000
commit27a53acf7190d20985a927f19fb5d0e90ad25e60 (patch)
tree91b177aca82a7a1b9848bbb184b61975b66deb9e /src/rccxml.c
parent2cdfde517e53ae2c7c3393a505e1f127e714fc59 (diff)
downloadlibrcc-27a53acf7190d20985a927f19fb5d0e90ad25e60.tar.gz
librcc-27a53acf7190d20985a927f19fb5d0e90ad25e60.tar.bz2
librcc-27a53acf7190d20985a927f19fb5d0e90ad25e60.tar.xz
librcc-27a53acf7190d20985a927f19fb5d0e90ad25e60.zip
Fixes
- Added 'rcc-gtk-config' program to examples - Fixed problems in autoconf configuration - Fixed bug in rccLocaleGetCharset - Fixed visibility of all items in gtkui
Diffstat (limited to 'src/rccxml.c')
-rw-r--r--src/rccxml.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rccxml.c b/src/rccxml.c
index 65a9c4d..143f930 100644
--- a/src/rccxml.c
+++ b/src/rccxml.c
@@ -281,12 +281,12 @@ int rccSave(rcc_context ctx, const char *name) {
if (!doc) {
doc = xmlNewDoc("1.0");
if (!doc) goto clear;
+ pnode = NULL;
+ } else {
+ xpathctx = xmlXPathNewContext(doc);
+ pnode = rccNodeFind(xpathctx, XPATH_SELECTED);
}
- xpathctx = xmlXPathNewContext(doc);
- if (!xpathctx) goto clear;
-
- pnode = rccNodeFind(xpathctx, XPATH_SELECTED);
if (pnode) {
lnode = rccNodeFind(xpathctx, XPATH_SELECTED_LANGUAGE);
onode = rccNodeFind(xpathctx, XPATH_SELECTED_OPTIONS);
@@ -483,8 +483,6 @@ int rccLoad(rcc_context ctx, const char *name) {
if ((!doc)&&(!sysdoc)) goto clear;
-
-
node = rccNodeFind(xpathctx, XPATH_SELECTED_LANGUAGE);
if (!node) node = rccNodeFind(sysxpathctx, XPATH_SELECTED_LANGUAGE);
if (node) {