From: <tm...@us...> - 2009-12-30 09:58:00
|
Revision: 4843 http://hugin.svn.sourceforge.net/hugin/?rev=4843&view=rev Author: tmodes Date: 2009-12-30 09:57:53 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Fixes crash on startup when loading a project without cp [2867671] Modified Paths: -------------- hugin/trunk/src/hugin1/hugin/MainFrame.cpp hugin/trunk/src/hugin_base/panotools/PanoToolsUtils.cpp Modified: hugin/trunk/src/hugin1/hugin/MainFrame.cpp =================================================================== --- hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2009-12-30 09:55:59 UTC (rev 4842) +++ hugin/trunk/src/hugin1/hugin/MainFrame.cpp 2009-12-30 09:57:53 UTC (rev 4843) @@ -60,6 +60,7 @@ #include "base_wx/MyProgressDialog.h" #include "base_wx/ImageCache.h" +#include "base_wx/PTWXDlg.h" #include "base_wx/huginConfig.h" @@ -653,9 +654,11 @@ wxString path = fname.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR); if (fname.IsOk() && fname.FileExists()) { wxBusyCursor wait; + deregisterPTWXDlgFcn(); GlobalCmdHist::getInstance().addCommand( new wxLoadPTProjectCmd(pano,(const char *)filename.mb_str(HUGIN_CONV_FILENAME), (const char *)path.mb_str(HUGIN_CONV_FILENAME)) ); + registerPTWXDlgFcn(MainFrame::Get()); DEBUG_DEBUG("project contains " << pano.getNrOfImages() << " after load"); opt_panel->setModeCustom(); SetStatusText(_("Project opened")); Modified: hugin/trunk/src/hugin_base/panotools/PanoToolsUtils.cpp =================================================================== --- hugin/trunk/src/hugin_base/panotools/PanoToolsUtils.cpp 2009-12-30 09:55:59 UTC (rev 4842) +++ hugin/trunk/src/hugin_base/panotools/PanoToolsUtils.cpp 2009-12-30 09:57:53 UTC (rev 4843) @@ -59,7 +59,7 @@ void calcCtrlPointErrors (PanoramaData& pano) { - if(pano.getNrOfImages()>0) + if(pano.getNrOfImages()>0 && pano.getNrOfCtrlPoints()>0) { char * p=setlocale(LC_ALL,NULL); char * oldlocale=strdup(p); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |