OS X: don't crash in GetSaveFile() if default extension is invalid.
This commit is contained in:
parent
a2c97fcd46
commit
4fad67d721
|
@ -810,6 +810,9 @@ bool SolveSpace::GetSaveFile(std::string *file, const std::string &defExtension,
|
|||
if(defExtension != "") {
|
||||
extensionIndex = [extensions indexOfObject:
|
||||
[NSString stringWithUTF8String:defExtension.c_str()]];
|
||||
if(extensionIndex == -1) {
|
||||
extensionIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
[button selectItemAtIndex:extensionIndex];
|
||||
|
|
Loading…
Reference in New Issue
Block a user