# HG changeset patch # User Matti Hamalainen # Date 1212748872 -10800 # Node ID 996281c0a457fc7df7a2626ea499b5a6b27e60b4 # Parent 17da667fb14d0e44051b62aa062c78fed46546bb Add a NULL check to avoid an idiotic crash. (This bug also revealed a problem in commandline handling - URIs are not constructed properly.) diff -r 17da667fb14d -r 996281c0a457 src/modplug/archive/open.cxx --- a/src/modplug/archive/open.cxx Fri Jun 06 13:40:13 2008 +0300 +++ b/src/modplug/archive/open.cxx Fri Jun 06 13:41:12 2008 +0300 @@ -19,8 +19,9 @@ string lExt; uint32 lPos; // convert from uri to fs based filepath - gchar *filename; - filename = g_filename_from_uri(aFileName.c_str(), NULL, NULL); + gchar *filename = g_filename_from_uri(aFileName.c_str(), NULL, NULL); + if (filename == NULL) + return new arch_Raw(aFileName); string lRealFileName(filename); g_free(filename);