[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11921] trunk/blender/source/blender/imbuf /intern/thumbs.c: == imagebrowser ==

Andrea Weikert elubie at gmx.net
Sun Sep 2 19:41:25 CEST 2007


Revision: 11921
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11921
Author:   elubie
Date:     2007-09-02 19:41:25 +0200 (Sun, 02 Sep 2007)

Log Message:
-----------
== imagebrowser ==
fix for missing null pointer check in IMB_thumb_create.
found by Diego Borghetti (bdiego) - thanks!

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/thumbs.c

Modified: trunk/blender/source/blender/imbuf/intern/thumbs.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/thumbs.c	2007-09-02 17:25:03 UTC (rev 11920)
+++ trunk/blender/source/blender/imbuf/intern/thumbs.c	2007-09-02 17:41:25 UTC (rev 11921)
@@ -281,12 +281,14 @@
 			if (THB_SOURCE_IMAGE == source) {
 				BLI_getwdN(wdir);
 				chdir(dir);
-				img = IMB_loadiffname(file, IB_rect);				
-				stat(file, &info);
-				sprintf(mtime, "%ld", info.st_mtime);
-				sprintf(cwidth, "%d", img->x);
-				sprintf(cheight, "%d", img->y);
-				chdir(wdir);
+				img = IMB_loadiffname(file, IB_rect);
+				if (img != NULL) {
+					stat(file, &info);
+					sprintf(mtime, "%ld", info.st_mtime);
+					sprintf(cwidth, "%d", img->x);
+					sprintf(cheight, "%d", img->y);
+					chdir(wdir);
+				}
 			} else if (THB_SOURCE_MOVIE == source) {
 				struct anim * anim = NULL;
 				BLI_getwdN(wdir);





More information about the Bf-blender-cvs mailing list