Resolves: fdo#70157 fix crash on loading

Change-Id: I0d248a195852c14cd95d4e337823076dd2fbc19d
(cherry picked from commit 8302d048653d9ac25d3cb9ab9277df715053ad6a)