After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676700 - 0.13.3: crashes if a .desktop file has no icon defined
0.13.3: crashes if a .desktop file has no icon defined
Status: RESOLVED FIXED
Product: alacarte
Classification: Applications
Component: general
0.13.x
Other Linux
: Normal normal
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-05-24 04:04 UTC by Alexandre Rostovtsev
Modified: 2012-06-01 04:22 UTC
See Also:
GNOME target: ---
GNOME version: 3.3/3.4


Attachments
proposed patch (780 bytes, patch)
2012-05-24 04:08 UTC, Alexandre Rostovtsev
committed Details | Review

Description Alexandre Rostovtsev 2012-05-24 04:04:21 UTC
If a .desktop file has no icon entry defined, alacarte crashes on startup:

Traceback (most recent call last):
  • File "/usr/bin/alacarte", line 36 in <module>
    main()
  • File "/usr/bin/alacarte", line 33 in main
    app.run()
  • File "/usr/lib64/python2.7/site-packages/Alacarte/MainWindow.py", line 73 in run
    self.loadMenus()
  • File "/usr/lib64/python2.7/site-packages/Alacarte/MainWindow.py", line 211 in loadMenus
    self.loadMenu(iters, menu)
  • File "/usr/lib64/python2.7/site-packages/Alacarte/MainWindow.py", line 229 in loadMenu
    icon = util.getIcon(menu)
  • File "/usr/lib64/python2.7/site-packages/Alacarte/util.py", line 143 in getIcon
    info = icon_theme.lookup_by_gicon(gicon, 24, 0)
  • File "/usr/lib64/python2.7/site-packages/gi/types.py", line 43 in function
    return info.invoke(*args, **kwargs)
TypeError: Argument 1 does not allow None as a value

Comment 1 Alexandre Rostovtsev 2012-05-24 04:08:20 UTC
Created attachment 214834 [details] [review]
proposed patch
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-06-01 04:22:30 UTC
I thought about whether this was the correct approach or not, and it is.