Skip to content

Commit

Permalink
Fixed: Crash attempting to load a map which utilizes XG
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 5, 2013
1 parent ac403ea commit 1da4f61
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions doomsday/client/src/def_main.cpp
Expand Up @@ -1821,19 +1821,25 @@ void Def_CopyLineType(linetype_t* l, ded_linetype_t* def)
l->deactLineType = def->deactLineType;
l->wallSection = def->wallSection;

try
if(def->actMaterial)
{
l->actMaterial = App_Materials().find(*reinterpret_cast<de::Uri *>(def->actMaterial)).id();
try
{
l->actMaterial = App_Materials().find(*reinterpret_cast<de::Uri *>(def->actMaterial)).id();
}
catch(Materials::NotFoundError const &)
{} // Ignore this error.
}
catch(Materials::NotFoundError const &)
{} // Ignore this error.

try
if(def->deactMaterial)
{
l->deactMaterial = App_Materials().find(*reinterpret_cast<de::Uri *>(def->deactMaterial)).id();
try
{
l->deactMaterial = App_Materials().find(*reinterpret_cast<de::Uri *>(def->deactMaterial)).id();
}
catch(Materials::NotFoundError const &)
{} // Ignore this error.
}
catch(Materials::NotFoundError const &)
{} // Ignore this error.

l->actMsg = def->actMsg;
l->deactMsg = def->deactMsg;
Expand Down

0 comments on commit 1da4f61

Please sign in to comment.