NULL MenuItem::Data() entries are now filtered out.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14497 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -464,10 +464,12 @@ apply_safe_mode_options(Menu *menu)
|
|||||||
buffer[0] = '\0';
|
buffer[0] = '\0';
|
||||||
|
|
||||||
while ((item = iterator.Next()) != NULL) {
|
while ((item = iterator.Next()) != NULL) {
|
||||||
if (item->Type() == MENU_ITEM_SEPARATOR || !item->IsMarked() || (uint32)pos > sizeof(buffer))
|
if (item->Type() == MENU_ITEM_SEPARATOR || !item->IsMarked()
|
||||||
|
|| item->Data() == NULL || (uint32)pos > sizeof(buffer))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pos += snprintf(buffer + pos, sizeof(buffer) - pos, "%s true\n", (const char *)item->Data());
|
pos += snprintf(buffer + pos, sizeof(buffer) - pos, "%s true\n",
|
||||||
|
(const char *)item->Data());
|
||||||
}
|
}
|
||||||
|
|
||||||
add_safe_mode_settings(buffer);
|
add_safe_mode_settings(buffer);
|
||||||
|
|||||||
Reference in New Issue
Block a user