Skip to content

gtkstack: fix null pointer dereference

Hugo Lefeuvre requested to merge hlef/gtk:master into master

The gtk_stack_snapshot_slide() function dereferences the last_visible_child pointer without proper != NULL check. This might result in NULL pointer dereference and crash if last_visible_child is invalid.

This patch adds a != NULL check before dereferencing the pointer.

I stumbled across this bug during my investigations on a crash issue affecting Account creation in (GNU) Ring.

Merge request reports