projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6472cb
)
Fix: free_fonts tries sometimes tries to free much
author
Nikolas Garofil
<garo@dunaldi.garofil.be>
Sun, 12 Jul 2009 16:29:50 +0000
(18:29 +0200)
committer
Nikolas Garofil
<garo@dunaldi.garofil.be>
Sun, 12 Jul 2009 16:29:50 +0000
(18:29 +0200)
When build with support for x11 and ran with a empty config this resulted in a segfault.
src/fonts.c
patch
|
blob
|
history
diff --git
a/src/fonts.c
b/src/fonts.c
index
61c7b85
..
0870129
100644
(file)
--- a/
src/fonts.c
+++ b/
src/fonts.c
@@
-31,6
+31,7
@@
int selected_font = 0;
int font_count = -1;
struct font_list *fonts = NULL;
+char fontloaded = 0;
void set_font(void)
{
@@
-120,7
+121,7
@@
void free_fonts(void)
{
int i;
- if ((output_methods & TO_X) == 0) {
+ if ((output_methods & TO_X) == 0 || fontloaded == 0) {
return;
}
for (i = 0; i <= font_count; i++) {
@@
-189,4
+190,5
@@
void load_fonts(void)
}
}
}
+ fontloaded = 1;
}