Commit 2c40175c authored by Pavel Vainerman's avatar Pavel Vainerman

Небольшое исправление в getProp(). Попытка вылечить std::exception 'logic_error'

parent e4b34973
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 1.0 Version: 1.0
Release: alt34 Release: alt35
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
......
...@@ -120,7 +120,7 @@ string UniXML::getPropUtf8(const xmlNode* node, const string name) ...@@ -120,7 +120,7 @@ string UniXML::getPropUtf8(const xmlNode* node, const string name)
string UniXML::getProp(const xmlNode* node, const string name) string UniXML::getProp(const xmlNode* node, const string name)
{ {
const char * text = (const char*)::xmlGetProp((xmlNode*)node, (const xmlChar*)name.c_str()); const char * text = (const char*)::xmlGetProp((xmlNode*)node, (const xmlChar*)name.c_str());
if (text == NULL) if( !text )
return ""; return "";
return string(text); return string(text);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment