]> git.saurik.com Git - wxWidgets.git/commit - src/common/textcmn.cpp
Don't set wxTextAttr font family to invalid value.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Nov 2009 15:59:27 +0000 (15:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Nov 2009 15:59:27 +0000 (15:59 +0000)
commitaa926768a9329b4eb4804c89de8da2061549708d
treec5de71e861d55a5d0aca49456bb7df173f3de6c2
parent8faed39597d32bbb2073e5c686c754473dc5575a
Don't set wxTextAttr font family to invalid value.

wxTextAttr::HasFontFamily() shouldn't return true if there is no valid font
family in this attribute but this could happen if it was constructed from a
font which didn't know its own family.

This fixes asserts on the startup of the text sample in wxMSW due to passing
wxFONTFAMILY_UNKNOWN to wxFont::SetFamily() when trying to use such invalid
attribute later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/textcmn.cpp