Added safety check when retrieving the active window title for global auto-type
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@207 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
parent
bc8ec1b520
commit
90d515f6e7
|
@ -170,14 +170,15 @@ void AutoType::performGlobal(){
|
|||
Window w;
|
||||
int revert_to_return;
|
||||
XGetInputFocus(d, &w, &revert_to_return);
|
||||
char** list;
|
||||
char** list = NULL;
|
||||
int tree;
|
||||
do {
|
||||
XTextProperty textProp;
|
||||
XGetWMName(d, w, &textProp);
|
||||
if (XGetWMName(d, w, &textProp) != 0) {
|
||||
int count;
|
||||
Xutf8TextPropertyToTextList(d, &textProp, &list, &count);
|
||||
if (Xutf8TextPropertyToTextList(d, &textProp, &list, &count)<0) return;
|
||||
if (list) break;
|
||||
}
|
||||
Window root = 0;
|
||||
Window parent = 0;
|
||||
Window* children = NULL;
|
||||
|
|
Loading…
Reference in New Issue