diff --git a/Editor/GeneralWindow.cpp b/Editor/GeneralWindow.cpp index 7a3b38358..ae242f8fe 100644 --- a/Editor/GeneralWindow.cpp +++ b/Editor/GeneralWindow.cpp @@ -461,8 +461,14 @@ void GeneralWindow::Create(EditorComponent* _editor) wi::vector imagedata; archive >> imagedata; static uint64_t cnt = 0; - if(!imagedata.empty()) + if (imagedata.empty()) + { + editor->themeEditorWnd.imageResource = {}; + } + else + { editor->themeEditorWnd.imageResource = wi::resourcemanager::Load(wi::helper::GetCurrentPath() + "/themes/" + imageresourcename, wi::resourcemanager::Flags::IMPORT_RETAIN_FILEDATA, imagedata.data(), imagedata.size()); + } } break; case Theme::Custom: