mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-05-07 15:01:49 -04:00
Merge pull request #14588 from jordan-woyak/resources-icon-assert
DolphinQt/Resources: ERROR_LOG instead of ASSERT when LoadNamedIcon fails.
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
#include <QImageReader>
|
||||
#include <QPixmap>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
|
||||
@@ -48,7 +48,10 @@ QIcon Resources::LoadNamedIcon(std::string_view name, const QString& dir)
|
||||
for (auto scale : {1, 2, 4})
|
||||
load_png(scale);
|
||||
|
||||
ASSERT(icon.availableSizes().size() > 0);
|
||||
if (icon.isNull())
|
||||
{
|
||||
ERROR_LOG_FMT(COMMON, "LoadNamedIcon: \"{}\" could not be loaded.", name);
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user