So I found a couple of pointers that were uniitialized, which I thought could be causing the crash. The problem is, I have a whole bunch of pointers declared from within a class, like so:
class MyWindow: public wxWindow
{
public:
...
...
private:
...
wxNotebook* ToolNB;
wxWindow* EventAnalysisWin;
wxWindow* DetectorWin;
wxWindow* MultimediaWin;
...
};
Of course, trying to initialize any of these NULL causes an error: only static const integral data members can be initialized within a class.
Are there any ways around this?
you do it in the constructor.
MyWindow():
wxWindow(),
ToolNB(NULL),
EventAnalysisWin(NULL),
DetectorWin(NULL),
MultimediaWin(NULL)
{
}
or
MyWindow(): wxWindow()
{
ToolNB = NULL;
EventAnalysisWin = NULL;
DetectorWin = NULL;
MultimediaWin = NULL;
}
even better would be to give them default values instead of NULL. Are you using any external resource files?