dbus set attr method crashes inkscape if the obj id is uknown
Bug #707054 reported by
joakim@verona.se
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
High
|
joakim@verona.se |
Bug Description
For example:
(inkdoc-
Related branches
lp://staging/~joakim-verona/inkscape/dbus-fixes
- jazzynico (community): Approve
-
Diff: 692 lines (+387/-61)11 files modifiedsrc/2geom/transforms.h (+4/-0)
src/2geom/utils.h (+1/-0)
src/desktop.h (+2/-1)
src/extension/dbus/dbus-init.cpp (+1/-1)
src/extension/dbus/document-interface.cpp (+178/-3)
src/extension/dbus/document-interface.h (+26/-0)
src/extension/dbus/document-interface.xml (+163/-2)
src/extension/dbus/proposed-interface.xml (+0/-50)
src/file.cpp (+3/-3)
src/file.h (+1/-1)
src/select-context.cpp (+8/-0)
Changed in inkscape: | |
assignee: | nobody → joakim@verona.se (joakim-verona) |
status: | New → In Progress |
tags: |
added: dbusapi removed: dbus |
To post a comment you must log in.
this seems like a bug in the inkscape core
SPObject *SPDocument: :getObjectById( gchar const *id) const val_if_ fail(id != NULL, NULL);
{
g_return_
GQuark idq = g_quark_ from_string( id); )g_hash_ table_lookup( priv->iddef, GINT_TO_ POINTER( idq));
return (SPObject*
}
if id is unknown, the spobject cast will fail. the client code assumes that NULL will be returned.
So the cast should be conditional,