aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--launcher/minecraft/mod/ResourcePack.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/ResourcePack.cpp b/launcher/minecraft/mod/ResourcePack.cpp
index 3fc10a2f..b97bedf8 100644
--- a/launcher/minecraft/mod/ResourcePack.cpp
+++ b/launcher/minecraft/mod/ResourcePack.cpp
@@ -47,6 +47,12 @@ void ResourcePack::setImage(QImage new_image)
m_pack_image_cache_key.key = QPixmapCache::insert(QPixmap::fromImage(new_image));
m_pack_image_cache_key.was_ever_used = true;
+
+ // This can happen if the pixmap is too big to fit in the cache :c
+ if (!m_pack_image_cache_key.key.isValid()) {
+ qWarning() << "Could not insert a image cache entry! Ignoring it.";
+ m_pack_image_cache_key.was_ever_used = false;
+ }
}
QPixmap ResourcePack::image(QSize size)