Skip to content

Commit

Permalink
Fixed assertion failures for abnormal shutdown during launch
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Dec 29, 2011
1 parent 666031a commit a5c6991
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion doomsday/engine/portable/src/pathdirectory.c
Expand Up @@ -515,7 +515,8 @@ PathDirectory* PathDirectory_New(void)

void PathDirectory_Delete(PathDirectory* pd)
{
assert(pd);
if(!pd) return;

clearPathHash(*hashAddressForNodeType(pd, PT_LEAF));
destroyPathHash(pd, PT_LEAF);

Expand Down Expand Up @@ -556,6 +557,7 @@ PathDirectoryNode* PathDirectory_Insert(PathDirectory* pd, const char* path, cha
int PathDirectory_Iterate2(PathDirectory* pd, int flags, PathDirectoryNode* parent,
ushort hash, pathdirectory_iteratecallback_t callback, void* paramaters)
{
if(!pd) return false;
return iteratePaths(pd, flags, parent, hash, callback, paramaters);
}

Expand Down
5 changes: 4 additions & 1 deletion doomsday/engine/portable/src/textures.c
Expand Up @@ -463,7 +463,10 @@ void Textures_Shutdown(void)
}
textureIdMapSize = 0;

Uri_Delete(emptyUri), emptyUri = NULL;
if(emptyUri)
{
Uri_Delete(emptyUri), emptyUri = NULL;
}
}

texturenamespaceid_t Textures_ParseNamespace(const char* str)
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/uri.c
Expand Up @@ -240,7 +240,7 @@ void Uri_Delete(Uri* uri)
{
if(!uri)
{
Con_Error("Attempted Uri::Destruct with invalid reference (this==0).");
Con_Error("Attempted Uri::Delete with invalid reference (this==0).");
return; // Unreachable.
}
Str_Free(&uri->_scheme);
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/unix/src/sys_audiod_loader.c
Expand Up @@ -175,7 +175,7 @@ audiodriver_t* Sys_LoadAudioDriver(const char* name)
}
if(NULL == ad)
{
Con_Message("Warning:Sys_LoadAudioDriver: Loading of \"%s\" failed.\n", Str_Text(&libPath));
Con_Message("Warning: Sys_LoadAudioDriver: Loading of \"%s\" failed.\n", Str_Text(&libPath));
}
Str_Free(&libPath);
}
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/win32/src/sys_audiod_loader.c
Expand Up @@ -169,7 +169,7 @@ audiodriver_t* Sys_LoadAudioDriver(const char* name)
}
if(NULL == ad)
{
Con_Message("Warning:Sys_LoadAudioDriver: Loading of \"%s\" failed.\n", Str_Text(&libPath));
Con_Message("Warning: Sys_LoadAudioDriver: Loading of \"%s\" failed.\n", Str_Text(&libPath));
}
Str_Free(&libPath);
}
Expand Down

0 comments on commit a5c6991

Please sign in to comment.