Skip to content

Commit

Permalink
AppModules/Winamp: check the index and the title of the currently sel…
Browse files Browse the repository at this point in the history
…ected entry in the playlist, as the empty playlist returns infinity and none for filetitle. re #2093.
  • Loading branch information
josephsl committed May 29, 2014
1 parent 01d26be commit 655b457
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/appModules/winamp.py
@@ -1,6 +1,6 @@
#appModules/winamp.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2012 NVDA Contributors
#Copyright (C) 2006-2014 NVDA Contributors
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

Expand Down Expand Up @@ -114,6 +114,8 @@ def _get_name(self):
winKernel.readProcessMemory(self.processHandle,internalInfo,byref(info),sizeof(info),None)
finally:
winKernel.virtualFreeEx(self.processHandle,internalInfo,0,winKernel.MEM_RELEASE)
if curIndex==4294967295 and not info.filetitle:
return self.windowText
return unicode("%d.\t%s\t%s"%(curIndex+1,info.filetitle,info.filelength), errors="replace", encoding=locale.getlocale()[1])

def _get_role(self):
Expand Down

0 comments on commit 655b457

Please sign in to comment.