mmg: test for nullptr before dereferencing the pointer

This commit is contained in:
Moritz Bunkus 2013-01-02 13:31:30 +01:00
parent d5fa5f4d8a
commit b228a2b3aa
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-01-02 Moritz Bunkus <moritz@bunkus.org>
* mmg: bug fix: Fixed a crash in the chapter editor if the root
was selected and the user used the "Set values" button.
2013-01-01 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge, mmg: removal: The 'header removal compression' method

View File

@ -1021,7 +1021,7 @@ tab_chapters::get_selected_chapter_display() {
return nullptr;
auto data = static_cast<chapter_node_data_c *>(tc_chapters->GetItemData(id));
if (!data->is_atom)
if (!data || !data->is_atom)
return nullptr;
size_t nth_chapter_display = 0;