Re: Invalid TextBuffer iterator
- From: Tom <tfj gmx de>
- To: gtkmm-list gnome org
- Subject: Re: Invalid TextBuffer iterator
- Date: Tue, 11 Dec 2012 06:22:07 +0100
On 10.12.2012 16:01, Dmitry Kruglov wrote
> Gtk::TextView* p_text_edit = 0;
> Glib::RefPtr<Gtk::TextBuffer> p_tb_result;
>
> p_tb_result = Gtk::TextBuffer::create();
> p_tb_result->set_text("Hello ch01 cout gmail com");
> p_text_edit->set_buffer(p_tb_result);
Hi Dmitry,
In the first line of the example above a pointer to Gtk::TextView is
created and initialised with 0 (nullptr). There is not an object of
Gtk::TextView. In the last line of the example a method of the not yet
constructed object is called. Maybe this is the reason for the crashes
of the programm?
tom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]