--- a/src/hugin1/hugin/ImagesPanel.cpp
+++ b/src/hugin1/hugin/ImagesPanel.cpp
@@ -169,7 +169,7 @@
 
 void DeleteClientData(wxChoice* cb)
 {
-    if(cb->HasClientData())
+    if(cb->HasClientUntypedData())
     {
         for(size_t i = 0; i < cb->GetCount(); i++)
         {