fix SubtitleProvider initialization order
Originally committed to SVN as r368.
This commit is contained in:
parent
24f889af56
commit
77545ee654
2 changed files with 6 additions and 4 deletions
|
@ -39,15 +39,17 @@
|
|||
#include "subtitle_provider.h"
|
||||
|
||||
|
||||
std::map<wxString, SubtitleProvider::Class *> SubtitleProvider::Class::classes;
|
||||
std::map<wxString, SubtitleProvider::Class *> *SubtitleProvider::Class::classes = NULL;
|
||||
|
||||
SubtitleProvider::Class::Class(wxString name)
|
||||
{
|
||||
classes.insert(std::make_pair(name, this));
|
||||
if (!classes)
|
||||
classes = new std::map<wxString, SubtitleProvider::Class *>();
|
||||
(*classes)[name] = this;
|
||||
}
|
||||
|
||||
SubtitleProvider *SubtitleProvider::Class::GetProvider(wxString provider_name, AssFile *subs)
|
||||
{
|
||||
return classes[provider_name]->Get(subs);
|
||||
return (*classes)[provider_name]->Get(subs);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
// };
|
||||
class Class {
|
||||
private:
|
||||
static std::map<wxString, SubtitleProvider::Class *> classes;
|
||||
static std::map<wxString, SubtitleProvider::Class *> *classes;
|
||||
|
||||
public:
|
||||
Class(wxString name);
|
||||
|
|
Loading…
Reference in a new issue