瀏覽代碼

# 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
aramis_acg 15 年之前
父節點
當前提交
2e2cb8ea79
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tools/assimp_view/MessageProc.cpp

+ 4 - 0
tools/assimp_view/MessageProc.cpp

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