summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--src/fl_font_xft.cxx5
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index ccca08263..ebbe491a9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.8
+ - Calling fl_font(0, 0) under Xft would access a NULL
+ pointer (STR #1205)
- Setting a new value in Fl_Input_ wil now actually move
cursor to the end of the input field as documented
(STR #1161)
diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx
index d608896bc..1c6a451da 100644
--- a/src/fl_font_xft.cxx
+++ b/src/fl_font_xft.cxx
@@ -95,8 +95,9 @@ const char* fl_encoding_ = "iso8859-1";
Fl_FontSize* fl_fontsize = 0;
void fl_font(int fnum, int size) {
- if (fnum == fl_font_ && size == fl_size_ &&
- !strcasecmp(fl_fontsize->encoding, fl_encoding_))
+ if (fnum == fl_font_ && size == fl_size_
+ && fl_fontsize
+ && !strcasecmp(fl_fontsize->encoding, fl_encoding_))
return;
fl_font_ = fnum; fl_size_ = size;
Fl_Fontdesc *font = fl_fonts + fnum;