Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented ParseColorModeDataSection #17

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
fix the check for a valid section
  • Loading branch information
heavenstone committed Jul 20, 2023
commit 1af5dd1be0df46d056f25027918192c025ff8c7d
10 changes: 4 additions & 6 deletions src/Psd/PsdParseColorModeDataSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ void DestroyColorModeDataSection(ColorModeDataSection*& section, Allocator* allo
PSD_ASSERT_NOT_NULL(section);
PSD_ASSERT_NOT_NULL(allocator);

if (section) {
if (section->colorData)
{
memoryUtil::FreeArray(allocator, section->colorData);
}
memoryUtil::Free(allocator, section);
if (section->colorData)
{
memoryUtil::FreeArray(allocator, section->colorData);
}
memoryUtil::Free(allocator, section);
}

PSD_NAMESPACE_END