about summary refs log tree commit diff
path: root/src/game/editor
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2012-07-22 10:43:19 +0200
committeroy <Tom_Adams@web.de>2013-02-24 17:44:45 +0100
commit4fb57dea91557cb1bd5da22a98e0531e83ee1471 (patch)
tree945fdac87cce23fa61bb6b02f68d7aa10cb656bf /src/game/editor
parent71907fbeb93267ecdb40747f9eb0aeb9c882917e (diff)
downloadzcatch-4fb57dea91557cb1bd5da22a98e0531e83ee1471.tar.gz
zcatch-4fb57dea91557cb1bd5da22a98e0531e83ee1471.zip
fixed editor crash on replacing images. Closes #981
Diffstat (limited to 'src/game/editor')
-rw-r--r--src/game/editor/editor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp
index 2c67c021..ee26a3f0 100644
--- a/src/game/editor/editor.cpp
+++ b/src/game/editor/editor.cpp
@@ -2438,6 +2438,7 @@ void CEditor::ReplaceImage(const char *pFileName, int StorageType, void *pUser)
 	pEditor->ExtractName(pFileName, pImg->m_aName, sizeof(pImg->m_aName));
 	pImg->m_AutoMapper.Load(pImg->m_aName);
 	pImg->m_TexID = pEditor->Graphics()->LoadTextureRaw(ImgInfo.m_Width, ImgInfo.m_Height, ImgInfo.m_Format, ImgInfo.m_pData, CImageInfo::FORMAT_AUTO, 0);
+	ImgInfo.m_pData = 0;
 	pEditor->SortImages();
 	for(int i = 0; i < pEditor->m_Map.m_lImages.size(); ++i)
 	{