AttributeError: 'NoneType' object has no attribute 'get_selected'

Bug #920009 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Fix Released
High
Curtis Hovey

Bug Description

I consistently see an error when committing:

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
Traceback (most recent call last):
  File "/home/curtis/.bazaar/plugins/gtk/commit.py", line 570, in _on_treeview_files_cursor_changed
    (model, selection) = treeselection.get_selected()
AttributeError: 'NoneType' object has no attribute 'get_selected'

The commit is successful, maybe this error is happening when the window is being torn down.
The method exist early if there is no selection. The method could also exit early if there is notreeselection

Tags: precise

Related branches

Revision history for this message
Curtis Hovey (sinzui) wrote :

I think treeselection can only be None during the destroy event. I see in the c-code that tree_view->priv->selection is assigned only twice. first on init and last on destroy.

Curtis Hovey (sinzui)
Changed in bzr-gtk:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.