0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

Fix bug magickcore file loading freeze

This seemed to happen if the 'file' variable was NULL.  For some reason,
magickcore would just totally freeze.
This commit is contained in:
jp9000 2014-06-28 18:52:13 -07:00
parent f61de450d1
commit f313aaa5a6

View File

@ -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) {