diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-12-01 20:52:35 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-12-01 20:52:35 +0000 |
commit | f4e8c71e8ee865ae72938f996c5654a0a2464ca2 (patch) | |
tree | 86461682e28a763a5097f5a169246ce95eb4ae01 /plugins/MirLua/src/m_genmenu.cpp | |
parent | e11fbeaf4ec32501aaa8a472ca15e8b630815572 (diff) |
MirLua: autogeneration of menu item uid
git-svn-id: http://svn.miranda-ng.org/main/trunk@15798 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_genmenu.cpp')
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index f1b9342c3e..df9e1a4694 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -15,8 +15,8 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi) lua_pushliteral(L, "Uid");
lua_gettable(L, -2);
const char* uuid = (char*)lua_tostring(L, -1);
- if (CLSIDFromString((LPCOLESTR)ptrT(mir_utf8decodeT(uuid)), (LPCLSID)&mi.uid) != NOERROR)
- UNSET_UID(mi);
+ if (uuid == NULL || CLSIDFromString((LPCOLESTR)ptrT(mir_utf8decodeT(uuid)), (LPCLSID)&mi.uid) != NOERROR)
+ CoCreateGuid((LPCLSID)&mi.uid);
lua_pop(L, 1);
lua_pushliteral(L, "Name");
|