Resolves: fdo#77206 CRASH printing with all applications on windows

Change-Id: I5d5066413508a115f6b4c63b8b3dd19268f66574
(cherry picked from commit 3041269ff285685d660a049bfef43f3dab6f8946)