Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:zeusever/lemon-lib into newtrace

  • Loading branch information...
commit bdeff9c089377061483b20549c2e989252e3065e 2 parents 5cda075 + 8773401
yayanyang authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 resource/package.cpp
View
8 resource/package.cpp
@@ -177,6 +177,8 @@ namespace lemon{namespace resource{
const ErrorMessage * em = iter->second.GetErrorMessage(code);
+ if(NULL == em) return result;
+
result.Name = iter->second.String(em->Name);
result.Description = iter->second.String(em->Description);
@@ -206,8 +208,12 @@ namespace lemon{namespace resource{
LocaleResourceTables::const_iterator iter = _resourceTables.find(locale);
if(iter == _resourceTables.end()) return NULL;
+
+ const TraceMessage * traceMessage = iter->second.GetTraceMessage(code);
+
+ if(NULL == traceMessage) return NULL;
- return iter->second.String(iter->second.GetTraceMessage(code)->Message);
+ return iter->second.String(traceMessage->Message);
}
const lemon::char_t * Package::GetText(lemon::char_t const * key,lemon::char_t const * locale) const
Please sign in to comment.
Something went wrong with that request. Please try again.