Browse Source

macros: check for null second.md first. tag #12

master
roytam1 2 years ago
parent
commit
15baf33ea0
  1. 4
      k-meleon/kplugins/macros2/macros.cpp

4
k-meleon/kplugins/macros2/macros.cpp

@ -793,14 +793,14 @@ int GetCmds(kmeleonCommand* cmdList, long size)
int count = 0;
TDS::iterator iter;
for( iter = M->tds.begin(); iter != M->tds.end(); iter++ ) {
if (iter->second.ismacro() && iter->second.md->macroInfo)
if (iter->second.ismacro() && iter->second.md && iter->second.md->macroInfo)
count++;
}
if (!cmdList || !count) return count;
count = 0;
for( iter = M->tds.begin(); iter != M->tds.end(); iter++ ) {
if (!iter->second.ismacro() || !iter->second.md->macroInfo)
if (!iter->second.ismacro() || !iter->second.md || !iter->second.md->macroInfo)
continue;
Context c = {NULL};

Loading…
Cancel
Save