From 4a43e7ab969cbb724244e84a164acbe14c7db4cf Mon Sep 17 00:00:00 2001 From: skeezix Date: Thu, 7 Mar 2013 23:17:53 -0500 Subject: [PATCH] Make 'arguments' to file association properly optional --- lib/pnd_tinyxml.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 -- 2.39.5