Avoid Gtk-CRITICAL with GTK3 when calling SetFont() before Create()
This commit is contained in:
@@ -60,7 +60,7 @@ bool wxControl::Create( wxWindow *parent,
|
|||||||
bool wxControl::SetFont(const wxFont& font)
|
bool wxControl::SetFont(const wxFont& font)
|
||||||
{
|
{
|
||||||
const bool changed = base_type::SetFont(font);
|
const bool changed = base_type::SetFont(font);
|
||||||
if (changed && !gtk_widget_get_realized(m_widget) && gtk_check_version(3,5,0))
|
if (changed && m_widget && !gtk_widget_get_realized(m_widget) && gtk_check_version(3,5,0))
|
||||||
{
|
{
|
||||||
// GTK defers sending "style-updated" until widget is realized, but
|
// GTK defers sending "style-updated" until widget is realized, but
|
||||||
// GetBestSize() won't compute correct result until the signal is sent,
|
// GetBestSize() won't compute correct result until the signal is sent,
|
||||||
|
Reference in New Issue
Block a user