提交 f313aaa5 编写于 作者: J jp9000

Fix bug magickcore file loading freeze

This seemed to happen if the 'file' variable was NULL.  For some reason,
magickcore would just totally freeze.
上级 f61de450
......@@ -14,11 +14,17 @@ void gs_free_image_deps()
texture_t gs_create_texture_from_file(const char *file)
{
texture_t tex = NULL;
ImageInfo *info = CloneImageInfo(NULL);
ExceptionInfo *exception = AcquireExceptionInfo();
texture_t tex = NULL;
ImageInfo *info;
ExceptionInfo *exception;
Image *image;
if (!file || !*file)
return NULL;
info = CloneImageInfo(NULL);
exception = AcquireExceptionInfo();
strcpy(info->filename, file);
image = ReadImage(info, exception);
if (image) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册