From 2e2cb8ea79909c21c143e5feb7cc0ec25e4bbea0 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 3 Apr 2011 18:42:03 +0000 Subject: [PATCH] # 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 --- tools/assimp_view/MessageProc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/assimp_view/MessageProc.cpp b/tools/assimp_view/MessageProc.cpp index 3e9cecf14..051659648 100644 --- a/tools/assimp_view/MessageProc.cpp +++ b/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);