mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #2945 from unknownbrackets/ui-minor
Fix minor crash on error screen, invalid filename on drive letter
This commit is contained in:
commit
d4edd619a4
2 changed files with 4 additions and 3 deletions
|
@ -29,12 +29,12 @@
|
|||
// TODO : improve, look in the file more
|
||||
EmuFileType Identify_File(std::string &filename)
|
||||
{
|
||||
if (filename.size() < 5) {
|
||||
if (filename.size() == 0) {
|
||||
ERROR_LOG(LOADER, "invalid filename %s", filename.c_str());
|
||||
return FILETYPE_ERROR;
|
||||
}
|
||||
|
||||
std::string extension = filename.substr(filename.size() - 4);
|
||||
std::string extension = filename.size() >= 5 ? filename.substr(filename.size() - 4) : "";
|
||||
if (!strcasecmp(extension.c_str(),".iso"))
|
||||
{
|
||||
return FILETYPE_PSP_ISO;
|
||||
|
|
|
@ -548,5 +548,6 @@ void EmuScreen::render() {
|
|||
|
||||
void EmuScreen::deviceLost() {
|
||||
ILOG("EmuScreen::deviceLost()");
|
||||
gpu->DeviceLost();
|
||||
if (gpu)
|
||||
gpu->DeviceLost();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue