summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-08-06 16:57:15 +0200
committerVaxry <vaxry@vaxry.net>2024-08-06 16:57:15 +0200
commitd597ae41b9ce7d995a4ad28bda9ef54d4d01a020 (patch)
tree2f02fff7c3181eb18d31503e8564aa4ed2f22cae /src/render/OpenGL.cpp
parent640d1618519d42dd592f7af5e9984ad52eb8b820 (diff)
renderer: fixup crashes on inaccessible files for bg
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 8875d8f4..c355f4f9 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -2688,12 +2688,10 @@ void CHyprOpenGLImpl::createBGTextureForMonitor(CMonitor* pMonitor) {
texPath += ".png";
// check if wallpapers exist
- if (!std::filesystem::exists(texPath)) {
- // try local
- texPath = texPath.substr(0, 5) + "local/" + texPath.substr(5);
-
- if (!std::filesystem::exists(texPath))
- return; // the texture will be empty, oh well. We'll clear with a solid color anyways.
+ std::error_code err;
+ if (!std::filesystem::exists(texPath, err)) {
+ Debug::log(ERR, "createBGTextureForMonitor: failed, file doesn't exist or access denied, ec: {}", err.message());
+ return; // the texture will be empty, oh well. We'll clear with a solid color anyways.
}
createBackgroundTexture(texPath);