Remove dead code

Coverity ids 60870,60871,60872,60873

Signed-off-by: Jens Georg <mail@jensge.org>

https://bugzilla.gnome.org/show_bug.cgi?id=730590
Remove unused assignment

Coverity issue 60874

Signed-off-by: Jens Georg <mail@jensge.org>

https://bugzilla.gnome.org/show_bug.cgi?id=730591
Add null checks

Fixes coverity issue 60869

Signed-off-by: Jens Georg <mail@jensge.org>

https://bugzilla.gnome.org/show_bug.cgi?id=731033