Skip to content

Fix crash in getCurrentPixelSizeConfig#956

Merged
marktsuchida merged 1 commit into
micro-manager:mainfrom
marktsuchida:fix-get-cur-px-size-cfg-nullopt
Jun 2, 2026
Merged

Fix crash in getCurrentPixelSizeConfig#956
marktsuchida merged 1 commit into
micro-manager:mainfrom
marktsuchida:fix-get-cur-px-size-cfg-nullopt

Conversation

@marktsuchida
Copy link
Copy Markdown
Member

@marktsuchida marktsuchida commented Jun 2, 2026

Fix a regression in #891. Could be a fix for #949.

When cached is true and one of the properties is not in the cache, we were dereferencing an empty std::optional.

Also elide the throw-catch for handling properties not in the cache. Exceptions are not good for control flow in C++.

Fix a regression in micro-manager#891.

When `cached` is true and one of the properties is not in the cache, we
were dereferencing an empty std::optional.

Also elide the throw-catch for handling properties not in the cache.
Exceptions are not good for control flow in C++.

(Assisted by Claude Code; any errors are mine.)
@marktsuchida marktsuchida merged commit 0efadc6 into micro-manager:main Jun 2, 2026
16 checks passed
@marktsuchida marktsuchida deleted the fix-get-cur-px-size-cfg-nullopt branch June 2, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant