Harm's patch to fix a crash of wxPoem sample on termination

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-01-27 18:42:14 +00:00
parent 48b4e3029f
commit bedd04ac5a
2 changed files with 12 additions and 12 deletions

View File

@ -249,20 +249,20 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
wxXMergeDatabases();
XrmDatabase database;
if (file) {
if ( !file.IsEmpty() ) {
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 = (wxNode*) NULL; /* suppress egcs warning */
node = wxTheResourceCache->Find(buffer);
node = wxTheResourceCache->Find(buffer);
if (node)
{
{
database = (XrmDatabase)node->Data();
}
else
{
}
else
{
database = XrmGetFileDatabase(buffer);
wxLogTrace(wxTraceResAlloc, "Get: Number = %d", wxTheResourceCache->Number());
wxTheResourceCache->Append(buffer, (wxObject *)database);

View File

@ -249,20 +249,20 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
wxXMergeDatabases();
XrmDatabase database;
if (file) {
if ( !file.IsEmpty() ) {
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 = (wxNode*) NULL; /* suppress egcs warning */
node = wxTheResourceCache->Find(buffer);
node = wxTheResourceCache->Find(buffer);
if (node)
{
{
database = (XrmDatabase)node->Data();
}
else
{
}
else
{
database = XrmGetFileDatabase(buffer);
wxLogTrace(wxTraceResAlloc, "Get: Number = %d", wxTheResourceCache->Number());
wxTheResourceCache->Append(buffer, (wxObject *)database);