Permalink
Browse files

checked whether currentKeyPress field exists

  • Loading branch information...
adityaapte committed Dec 5, 2018
1 parent 49b12ec commit b8c118ffa32cdf9b1ef8b05222432dec2347ff6e
Showing with 1 addition and 1 deletion.
  1. +1 −1 CERR_core/Utilities/CERRHotKeys.m
@@ -36,7 +36,7 @@ function CERRHotKeys()
keyPressed = get(gcbf, 'CurrentCharacter');
keyValue = uint8(keyPressed);
%
if ~isempty(stateS.currentKeyPress)
if isfield(stateS, 'currentKeyPress') && ~isempty(stateS.currentKeyPress)
stateS.currentKeyPress = keyValue;
end

0 comments on commit b8c118f

Please sign in to comment.