diff --git a/unix/font.c b/unix/font.c index 0cecc15d..2b8d0344 100644 --- a/unix/font.c +++ b/unix/font.c @@ -589,10 +589,9 @@ prima_font_pick( PFont source, Matrix matrix, PFont dest, unsigned int selection if ( selection == 0 ) selection = FONTKEY_DEFAULT; - if ( dest != NULL ) - Drawable_font_add( NULL_HANDLE, source, dest ); - else + if ( dest == NULL ) dest = source; + Drawable_font_add( NULL_HANDLE, source, dest ); #ifdef USE_FONTQUERY if ( selection & FONTKEY_FREETYPE ) diff --git a/win32/stock.c b/win32/stock.c index 6da1156f..906935f4 100644 --- a/win32/stock.c +++ b/win32/stock.c @@ -1573,8 +1573,10 @@ apc_font_pick( Handle self, PFont source, PFont dest) if ( dest != NULL ) { Drawable_font_add( NULL_HANDLE, source, dest ); source = dest; - } else + } else { dest = source; + Drawable_font_add( NULL_HANDLE, source, dest ); + } if ( self && is_opt(optInFontQuery)) res.x = res.y = 72; else