VirKeyboard: Fixed possible segfault
Fix to VirKeyboard, so invalid keys do not get registered. Based upon recommendation by zenon48 in: http://www.kvraudio.com/forum/viewtopic.php?t=266432 (cherry picked from commit b9e7cb07bd00780967c68d17deab2190e18a604d)
This commit is contained in:
committed by
Tobias Doerffel
parent
d94b8882dd
commit
d61283ad93
@@ -960,3 +960,6 @@
|
||||
|
||||
28 Oct 2009 (Paul Nasca)
|
||||
- Disable "bw" control on Reverb when Bandwidth mode is not enabled
|
||||
|
||||
18 Nov 2009 (Mark McCurry)
|
||||
- Fixed segfault in VirKeyBoard
|
||||
|
||||
@@ -103,7 +103,7 @@ if ((event==FL_PUSH)||(event==FL_DRAG)||(event==FL_RELEASE)){
|
||||
};
|
||||
};
|
||||
|
||||
if (((event==FL_PUSH)||(event==FL_DRAG))&&
|
||||
if ((keypos!=-1)&&((event==FL_PUSH)||(event==FL_DRAG))&&
|
||||
(Fl::event_shift()==0)) {
|
||||
presskey(kpos,1,1);
|
||||
};
|
||||
|
||||
@@ -138,7 +138,7 @@ if ((event==FL_PUSH)||(event==FL_DRAG)||(event==FL_RELEASE)){
|
||||
};
|
||||
};
|
||||
|
||||
if (((event==FL_PUSH)||(event==FL_DRAG))&&
|
||||
if ((keypos!=-1)&&((event==FL_PUSH)||(event==FL_DRAG))&&
|
||||
(Fl::event_shift()==0)) {
|
||||
presskey(kpos,1,1);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user