X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/914589c26ced86ffa672171ee476e1740538fbb8..523050b607cfb5e6f9dfcb1544eb4f49ec1978cd:/src/os2/icon.cpp

diff --git a/src/os2/icon.cpp b/src/os2/icon.cpp
index 9168126aee..26f744c91f 100644
--- a/src/os2/icon.cpp
+++ b/src/os2/icon.cpp
@@ -94,11 +94,11 @@ bool wxIcon::LoadFile(
 , int                               nDesiredHeight
 )
 {
-    wxGDIImageHandler*              pHandler = FindHandler(lType);
     HPS                             hPs = NULLHANDLE;
 
     UnRef();
-    m_refData = new wxIconRefData;
+
+    wxGDIImageHandler*              pHandler = FindHandler(lType);
 
     if (pHandler)
         return(pHandler->Load( this