The G_OBJECT_GET_CLASS macro is probably dereferencing gobject_, e.g.,
replacing it with gobject_->class or some such...
-- Alan
On 11/18/2013 6:53 AM, John Emmas wrote:
I'm trying to debug a program which keeps crashing in
'Gtk::Widget::on_hide()'. Here's what that function looks like:-
void Gtk::Widget::on_hide()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) //
Get the parent class of the object class (The original underlying C
class).
);
if(base && base->hide)
(*base->hide)(gobj());
}
Every time the crash occurs, variable 'gobject_' is always NULL.
Although I'm currently trying to figure out why, the above code looks
(to my untrained eye) as though it should be reasonably well behaved
with a NULL gobject_. It looks as if that function should be safe,
even when gobject_ is NULL. Is that a reasonable assessment or just
wishful thinking on my part?
John
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list