# fix crash when attempting to export without having a model loaded.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@941 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2011-04-03 18:42:03 +00:00
parent 1c37910f5f
commit 2e2cb8ea79
1 changed files with 4 additions and 0 deletions

View File

@ -1026,6 +1026,10 @@ void PopulateExportMenu()
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
void DoExport(size_t formatId) void DoExport(size_t formatId)
{ {
if (!g_szFileName) {
return;
}
Exporter exp; Exporter exp;
const aiExportFormatDesc* const e = exp.GetExportFormatDescription(formatId); const aiExportFormatDesc* const e = exp.GetExportFormatDescription(formatId);
assert(e); assert(e);