From b12b2a60a74fd0f9e4d047dfac6bf0a248751c48 Mon Sep 17 00:00:00 2001 From: Michael Pfeiffer Date: Sun, 12 Dec 2010 08:06:19 +0000 Subject: [PATCH] * Bug fix: The configuration dialog was never opened, because it could read the attribute "transport_address" created and set to an empty string by the print_server when the printer was created. fEndpoint used an empty host name to connect to and then failed. Not sure why this caused a crash after closing the error dialog. Maybe something went wrong in the destructor using an invalid fEndpoint? Cures the symptoms of ticket #6973. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39818 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../print/transports/hp_jetdirect/HPJetDirectTransport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp b/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp index 6b99c8f1e4..ce19bd062b 100644 --- a/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp +++ b/src/add-ons/print/transports/hp_jetdirect/HPJetDirectTransport.cpp @@ -29,7 +29,8 @@ HPJetDirectPort::HPJetDirectPort(BDirectory* printer, BMessage *msg) { BString address; - if (printer->ReadAttrString("transport_address", &address) < 0) { + if (printer->ReadAttrString("transport_address", &address) < 0 + || address.Length() == 0) { SetupWindow *setup = new SetupWindow(printer); if (setup->Go() == B_ERROR) return;