From 4fb57dea91557cb1bd5da22a98e0531e83ee1471 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 22 Jul 2012 10:43:19 +0200 Subject: fixed editor crash on replacing images. Closes #981 --- src/game/editor/editor.cpp | 1 + 1 file changed, 1 insertion(+) 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) { -- cgit 1.4.1