Calling PrintGetPrinter() with no printers on the workstation causes a hard crash (of an application or the Powerbuilder IDE if run in debug mode).
I'm working around the issue by first calling PrintGetPrinters() (returns an empty string) so I can check to see if there are no printers installed.
This is under Powerbuilder 2019 R2, not sure if R3 has a fix.
Do you happen to know if it was a recent regression? Did it work under PB 12?
The related ticket is 5553 and it relates to the same problem as you have. However, ticket 5553 is logged against PB 2019R3 Beta. In other tickets that had issues with the "PrintGetPrinter" method, they were complaining about not getting a return value when run under Citrix and/or RDT (Terminal Server). These other "PrintGetPrinter" issues did not end in an App crash though.
One of the related tickets did record that that PB 12.6 did not have the same behavior for the ""PrintGetPrinter" command. However, this was for not returning a valid value vs an App crash in your case.
Regards ... Chris