diff options
| author | oy <Tom_Adams@web.de> | 2012-07-22 10:43:19 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2013-02-24 17:44:45 +0100 |
| commit | 4fb57dea91557cb1bd5da22a98e0531e83ee1471 (patch) | |
| tree | 945fdac87cce23fa61bb6b02f68d7aa10cb656bf | |
| parent | 71907fbeb93267ecdb40747f9eb0aeb9c882917e (diff) | |
| download | zcatch-4fb57dea91557cb1bd5da22a98e0531e83ee1471.tar.gz zcatch-4fb57dea91557cb1bd5da22a98e0531e83ee1471.zip | |
fixed editor crash on replacing images. Closes #981
| -rw-r--r-- | src/game/editor/editor.cpp | 1 |
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) { |