Changeset 736


Ignore:
Timestamp:
12/6/2008 3:04:15 AM (6 years ago)
Author:
lowjoel
Message:

Fixed crash in Explorer because of the lack of a mechanism to maintain the MenuTitle? pointer.

Location:
branches/eraser6/ShellExt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/ShellExt/CtxMenu.cpp

    r735 r736  
    8484 
    8585namespace Eraser { 
    86     wchar_t* CCtxMenu::MenuTitle = NULL; 
    87  
    8886    HRESULT CCtxMenu::FinalConstruct() 
    8987    { 
    9088        //Initialise member variables. 
    9189        MenuID = 0; 
    92         if (!MenuTitle) 
    93         { 
    94             std::wstring menuTitle(LoadString(IDS_ERASER)); 
    95             MenuTitle = new wchar_t[menuTitle.length() + 1]; 
    96             wcscpy_s(MenuTitle, menuTitle.length() + 1, menuTitle.c_str()); 
    97         } 
     90        std::wstring menuTitle(LoadString(IDS_ERASER)); 
     91        MenuTitle = new wchar_t[menuTitle.length() + 1]; 
     92        wcscpy_s(MenuTitle, menuTitle.length() + 1, menuTitle.c_str()); 
    9893 
    9994        return S_OK; 
  • branches/eraser6/ShellExt/CtxMenu.h

    r735 r736  
    8888 
    8989    protected: 
    90         static wchar_t*             MenuTitle; 
    91  
     90        wchar_t*                    MenuTitle; 
    9291        InvokeReasons               InvokeReason; 
    9392        std::wstring                DragDropDestinationDirectory; 
Note: See TracChangeset for help on using the changeset viewer.