Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-09 06:52:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-09 06:52:27 +0300
commita85ffa6ffdf9576e1c570068521e098b1d1334f2 (patch)
tree1d5133a1feb4f886d4a27b4224b27203be4b9d09 /source/blender/quicktime
parentcd71a6d12b7e055b501676d22b8168453bf7da4d (diff)
bugfix [#24578] crash on browse directory w/ broken image file
Was trying to decode an image when quicktime wasn't initialized. There are a few other reports on windows about thumbnails crashing which this probably fixes. This also fixes a bug where DisposeHandle wasn't called if decode was called with a NULL pointer.
Diffstat (limited to 'source/blender/quicktime')
-rw-r--r--source/blender/quicktime/apple/quicktime_import.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c
index 917a75772ce..08196553a79 100644
--- a/source/blender/quicktime/apple/quicktime_import.c
+++ b/source/blender/quicktime/apple/quicktime_import.c
@@ -611,7 +611,7 @@ ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags)
ImageDescriptionHandle desc;
ComponentInstance dataHandler;
- PointerDataRef dataref = (PointerDataRef)NewHandle(sizeof(PointerDataRefRecord));
+ PointerDataRef dataref;
int x, y, depth;
int have_gw = FALSE;
@@ -634,11 +634,12 @@ ImBuf *imb_quicktime_decode(unsigned char *mem, int size, int flags)
unsigned char *from, *to;
#endif
- if (mem == NULL)
+ if (mem == NULL || !G.have_quicktime)
goto bail;
if(QTIME_DEBUG) printf("qt: attempt to load mem as image\n");
+ dataref= (PointerDataRef)NewHandle(sizeof(PointerDataRefRecord));
(**dataref).data = mem;
(**dataref).dataLength = size;