- bugfix, added a check to map editor and g3d viewer for ico file existance before trying to load the ico file
This commit is contained in:
parent
e58055dfad
commit
e400f449d6
|
@ -128,7 +128,11 @@ MainWindow::MainWindow(const string &modelPath)
|
||||||
#else
|
#else
|
||||||
//std::cout << "B" << std::endl;
|
//std::cout << "B" << std::endl;
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
icon.LoadFile(wxT("g3dviewer.ico"),wxBITMAP_TYPE_ICO);
|
std::ifstream testFile("g3dviewer.ico");
|
||||||
|
if(testFile.good()) {
|
||||||
|
testFile.close();
|
||||||
|
icon.LoadFile(wxT("g3dviewer.ico"),wxBITMAP_TYPE_ICO);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
//std::cout << "C" << std::endl;
|
//std::cout << "C" << std::endl;
|
||||||
SetIcon(icon);
|
SetIcon(icon);
|
||||||
|
|
|
@ -299,7 +299,11 @@ MainWindow::MainWindow()
|
||||||
#else
|
#else
|
||||||
//std::cout << "B" << std::endl;
|
//std::cout << "B" << std::endl;
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
icon.LoadFile(wxT("editor.ico"),wxBITMAP_TYPE_ICO);
|
std::ifstream testFile("editor.ico");
|
||||||
|
if(testFile.good()) {
|
||||||
|
testFile.close();
|
||||||
|
icon.LoadFile(wxT("editor.ico"),wxBITMAP_TYPE_ICO);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
//std::cout << "C" << std::endl;
|
//std::cout << "C" << std::endl;
|
||||||
SetIcon(icon);
|
SetIcon(icon);
|
||||||
|
|
Loading…
Reference in New Issue