From: skeezix Date: Thu, 12 Jan 2012 19:30:03 +0000 (-0500) Subject: Lame little fix in case of lazy consumer code X-Git-Tag: sz_beta3~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=commitdiff_plain;h=eebb32b5e16dd473f81267887f73c447a45acdc5 Lame little fix in case of lazy consumer code --- diff --git a/lib/pnd_desktop.c b/lib/pnd_desktop.c index 168ae74..be58955 100644 --- 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 + // 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 ); }