** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadproj.cpp,v 1.7 2001/03/02 21:11:50 kevin Exp $
+** $Id: threadproj.cpp,v 1.8 2001/03/02 21:32:34 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
Projections* pProjections = getProjections();
- wxMutexGuiEnter();
+ if (! wxThread::IsMain())
+ wxMutexGuiEnter();
ProjectionFileDocument* pProjDoc = theApp->newProjectionDoc();
if (! pProjDoc) {
sys_error (ERR_SEVERE, "Unable to create projection file");
projView->getFrame()->Show(true);
}
*theApp->getLog() << m_pszLabel << "\n";
- wxMutexGuiLeave();
+ if (! wxThread::IsMain())
+ wxMutexGuiLeave();
if (theApp->getAskDeleteNewDocs())
pProjDoc->Modify (true);