Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding condition to CoreTiming state function
because ev->type might be undefined in MODE_READ
  • Loading branch information
john-peterson committed May 27, 2013
1 parent 2697b8c commit 388ddee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Core/Core/Src/CoreTiming.cpp
Expand Up @@ -170,7 +170,10 @@ void EventDoState(PointerWrap &p, BaseEvent* ev)

// we can't savestate ev->type directly because events might not get registered in the same order (or at all) every time.
// so, we savestate the event's type's name, and derive ev->type from that when loading.
std::string name = event_types[ev->type].name;
std::string name;
if (p.GetMode() != PointerWrap::MODE_READ)
name = event_types[ev->type].name;

p.Do(name);
if (p.GetMode() == PointerWrap::MODE_READ)
{
Expand Down

0 comments on commit 388ddee

Please sign in to comment.