From f4e8c71e8ee865ae72938f996c5654a0a2464ca2 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 1 Dec 2015 20:52:35 +0000 Subject: MirLua: autogeneration of menu item uid git-svn-id: http://svn.miranda-ng.org/main/trunk@15798 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_genmenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/MirLua/src') 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"); -- cgit v1.2.3