Skip to content

Commit

Permalink
Only return true for CanReadMultithreaded and CanWriteMultithreaded w…
Browse files Browse the repository at this point in the history
…hen the format supports reading/writing.
  • Loading branch information
dlemstra committed Mar 26, 2024
1 parent df9ff09 commit 8a0e7f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Magick.Native/MagickFormatInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ MAGICK_NATIVE_EXPORT void MagickFormatInfo_DisposeList(char **list, const size_t

MAGICK_NATIVE_EXPORT MagickBooleanType MagickFormatInfo_CanReadMultithreaded_Get(const MagickInfo *instance)
{
return GetMagickDecoderThreadSupport(instance);
return GetImageDecoder(instance) == (DecodeImageHandler *) NULL ? MagickFalse : GetMagickDecoderThreadSupport(instance);
}

MAGICK_NATIVE_EXPORT MagickBooleanType MagickFormatInfo_CanWriteMultithreaded_Get(const MagickInfo *instance)
{
return GetMagickEncoderThreadSupport(instance);
return GetImageEncoder(instance) == (EncodeImageHandler *) NULL ? MagickFalse : GetMagickEncoderThreadSupport(instance);
}

MAGICK_NATIVE_EXPORT const char *MagickFormatInfo_Description_Get(const MagickInfo *instance)
Expand Down

0 comments on commit 8a0e7f3

Please sign in to comment.