From eebb32b5e16dd473f81267887f73c447a45acdc5 Mon Sep 17 00:00:00 2001 From: skeezix Date: Thu, 12 Jan 2012 14:30:03 -0500 Subject: [PATCH] Lame little fix in case of lazy consumer code --- lib/pnd_desktop.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ); } -- 2.39.2