if (gtk_text_buffer_get_char_count(m_buffer) != 0)
IgnoreNextTextUpdate();
+ if ( !buffer )
+ {
+ // what else can we do? at least don't crash...
+ return;
+ }
+
gtk_text_buffer_set_text( m_buffer, buffer, strlen(buffer) );
#else
#else
wxCharBuffer buffer( wxConvUTF8.cWC2MB( wxConvLocal.cWX2WC( text ) ) );
#endif
+ if ( !buffer )
+ {
+ // what else can we do? at least don't crash...
+ return;
+ }
+
gtk_editable_insert_text( GTK_EDITABLE(m_text), buffer, strlen(buffer), &len );
#else