Skip to content

Commit a53c872

Browse files
committed
assign default error message
1 parent 2df6437 commit a53c872

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stb_image.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,8 @@ static const char *stbi__g_failure_reason;
845845

846846
STBIDEF const char *stbi_failure_reason(void)
847847
{
848+
if (stbi__g_failure_reason == NULL)
849+
stbi__g_failure_reason = "unknwon error, refer error message before assignment";
848850
return stbi__g_failure_reason;
849851
}
850852

0 commit comments

Comments
 (0)