- if (file) {
- char buffer[500];
- // Is this right? Trying to get it to look in the user's
- // home directory instead of current directory -- JACS
- (void)GetIniFile(buffer, file);
-
- wxNode *node = wxResourceCache.Find(buffer);
- if (node)
- database = (XrmDatabase)node->Data();
- else {
- database = XrmGetFileDatabase(buffer);
- wxResourceCache.Append(buffer, (wxObject *)database);
- }
+ if (!file.IsEmpty())
+ {
+ wxChar buffer[500];
+ // Is this right? Trying to get it to look in the user's
+ // home directory instead of current directory -- JACS
+ (void)GetIniFile(buffer, file);
+
+ wxNode *node = (wxNode*) NULL; /* suppress egcs warning */
+ node = wxTheResourceCache->Find(buffer);
+ if (node)
+ {
+ database = (XrmDatabase)node->Data();
+ }
+ else
+ {
+ database = XrmGetFileDatabase(wxConv_file.cWX2MB(buffer));
+ wxLogTrace(wxTraceResAlloc, _T("Get: Number = %d"), wxTheResourceCache->Number());
+ wxTheResourceCache->Append(buffer, (wxObject *)database);
+ }