[Bf-committers] patch for bug #1700

Rob Haarsma rob at captainvideo.nl
Fri Dec 3 15:10:01 CET 2004


Lost my cvs writing ability, thought to fix this one for the 2.36 release.
Maybe someone would apply this ?

Bugfix #1700

If a font is missing, the default font is now used for the text object.
An Error message pops up and the name of the missing font is printed
in the console.


-------------- next part --------------
Index: source/blender/blenkernel/intern/font.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenkernel/intern/font.c,v
retrieving revision 1.10
diff -u -r1.10 font.c
--- source/blender/blenkernel/intern/font.c	21 Nov 2004 10:42:42 -0000	1.10
+++ source/blender/blenkernel/intern/font.c	3 Dec 2004 13:41:15 -0000
@@ -141,6 +141,13 @@
 			} else {
 				pf= newPackedFile(vfont->name);
 			}
+			if(!pf) {
+				error("Missing font replaced with default font, check console");
+				printf("Font file doesn't exist: %s\n", vfont->name);
+
+				strcpy(vfont->name, "<builtin>");
+				pf= get_builtin_packedfile();
+			}
 		}
 		
 		if (pf) {


More information about the Bf-committers mailing list