Permalink
Browse files

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

  • Loading branch information...
2 parents 5cda075 + 8773401 commit bdeff9c089377061483b20549c2e989252e3065e @yayanyang yayanyang committed Aug 24, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 resource/package.cpp
View
@@ -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

0 comments on commit bdeff9c

Please sign in to comment.