summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--minuitwrp/resources.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/minuitwrp/resources.c b/minuitwrp/resources.c
index 6f6d13b2b..bb301477f 100644
--- a/minuitwrp/resources.c
+++ b/minuitwrp/resources.c
@@ -63,8 +63,11 @@ static int open_png(const char* name, png_structp* png_ptr, png_infop* info_ptr,
resPath[sizeof(resPath)-1] = '\0';
FILE* fp = fopen(resPath, "rb");
if (fp == NULL) {
- result = -1;
- goto exit;
+ fp = fopen(name, "rb");
+ if (fp == NULL) {
+ result = -1;
+ goto exit;
+ }
}
size_t bytesRead = fread(header, 1, sizeof(header), fp);