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:
Diffstat (limited to 'source/blender/blenkernel/intern/bmfont.c')
-rw-r--r--source/blender/blenkernel/intern/bmfont.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index 409e7edb519..e2a6c04450b 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -51,17 +51,11 @@
#include <stdio.h>
#include "MEM_guardedalloc.h"
-#include "BLI_blenlib.h"
#include "BKE_global.h"
#include "IMB_imbuf_types.h"
-#include "BKE_bmfont.h"
#include "BKE_bmfont_types.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
void printfGlyph(bmGlyph * glyph)
{
printf("unicode: %d '%c'\n", glyph->unicode, glyph->unicode);
@@ -180,8 +174,8 @@ void detectBitmapFont(ImBuf *ibuf)
unsigned short version;
int i;
- if (ibuf != NULL) {
- // bitmap must have an x size that is a power of two
+ if (ibuf != NULL && ibuf->rect != NULL) {
+ // bitmap must have an x size that is a power of two
if (is_power_of_two(ibuf->x)) {
rect = (unsigned char *) (ibuf->rect + (ibuf->x * (ibuf->y - 1)));
// printf ("starts with: %s %c %c %c %c\n", rect, rect[0], rect[1], rect[2], rect[3]);