[win32] call free() and not scaled_font_destroy() if scaled init fails

If scaled_font_destroy() is called, a deadlock can result; there's no
reason to call destroy since the initialization failed (and, indeed,
it might not be valid to do so anyway).
This commit is contained in:
Vladimir Vukicevic 2007-08-28 10:47:52 -07:00
parent ae19b1c991
commit 6525d4debb

View file

@ -308,7 +308,7 @@ _win32_scaled_font_create (LOGFONTW *logfont,
status = _cairo_win32_scaled_font_set_metrics (f);
if (status) {
cairo_scaled_font_destroy (&f->base);
free (f);
return NULL;
}