From: skeezix Date: Fri, 8 Mar 2013 04:17:53 +0000 (-0500) Subject: Make 'arguments' to file association properly optional X-Git-Tag: sz_173~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a43e7ab969cbb724244e84a164acbe14c7db4cf;p=pandora-libraries.git Make 'arguments' to file association properly optional --- diff --git a/lib/pnd_tinyxml.cpp b/lib/pnd_tinyxml.cpp index 40c928b..641769b 100644 --- a/lib/pnd_tinyxml.cpp +++ b/lib/pnd_tinyxml.cpp @@ -439,7 +439,9 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int app->associationitem1_name = strdup ( name ); app->associationitem1_filetype = strdup ( filetype ); app->associationitem1_command = strdup ( command ); - app->associationitem1_args = strdup ( args ); + if ( args ) { + app->associationitem1_args = strdup ( args ); + } //pnd_log ( PND_LOG_DEFAULT, (char*)" Found file association request in PXML (%d-0)\n", i ); break; } @@ -447,7 +449,9 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int app->associationitem2_name = strdup ( name ); app->associationitem2_filetype = strdup ( filetype ); app->associationitem2_command = strdup ( command ); - app->associationitem2_args = strdup ( args ); + if ( args ) { + app->associationitem2_args = strdup ( args ); + } //pnd_log ( PND_LOG_DEFAULT, (char*)" Found file association request in PXML (%d-1)\n", i ); break; } @@ -455,7 +459,9 @@ unsigned char pnd_pxml_parse ( const char *pFilename, char *buffer, unsigned int app->associationitem3_name = strdup ( name ); app->associationitem3_filetype = strdup ( filetype ); app->associationitem3_command = strdup ( command ); - app->associationitem3_args = strdup ( args ); + if ( args ) { + app->associationitem3_args = strdup ( args ); + } //pnd_log ( PND_LOG_DEFAULT, (char*)" Found file association request in PXML (%d-2)\n", i ); } // case } // switch