git.openpandora.org
/
pandora-libraries.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8398577
)
Lame little fix in case of lazy consumer code
author
skeezix
<skeezix@flotsam-vm.(none)>
Thu, 12 Jan 2012 19:30:03 +0000
(14:30 -0500)
committer
skeezix
<skeezix@flotsam-vm.(none)>
Thu, 12 Jan 2012 19:30:03 +0000
(14:30 -0500)
lib/pnd_desktop.c
patch
|
blob
|
history
diff --git
a/lib/pnd_desktop.c
b/lib/pnd_desktop.c
index
168ae74
..
be58955
100644
(file)
--- a/
lib/pnd_desktop.c
+++ b/
lib/pnd_desktop.c
@@
-1008,6
+1008,14
@@
pnd_disco_t *pnd_parse_dotdesktop ( char *ddpath, unsigned int flags ) {
}
#endif
}
#endif
+ // lame guards, in case of lazy consumers and broken .desktop files
+ if ( p -> object_path == NULL ) {
+ p -> object_path = strdup ( "/tmp" );
+ }
+ if ( p -> object_filename == NULL ) {
+ p -> object_filename = strdup ( "" ); // force bad filename
+ }
+
// return disco-t
return ( p );
}
// return disco-t
return ( p );
}