зеркало из https://github.com/mozilla/pjs.git
Make sure the port is initialized before being used.
This commit is contained in:
Родитель
ad52856eb9
Коммит
59e4e80c3d
|
@ -63,16 +63,18 @@ nsresult theResult = NS_ERROR_FAILURE;
|
|||
THPrint prtRec;
|
||||
GrafPtr oldport;
|
||||
|
||||
::GetPort(&oldport);
|
||||
|
||||
// open the printing manager
|
||||
::PrOpen();
|
||||
if(::PrError() == noErr){
|
||||
mPrintManagerOpen = PR_TRUE;
|
||||
prtRec = (THPrint) NewHandle(sizeof(TPrint));
|
||||
prtRec = (THPrint)::NewHandle(sizeof(TPrint));
|
||||
if(prtRec!=nsnull){
|
||||
::PrintDefault(prtRec);
|
||||
|
||||
// standard print dialog, if true print
|
||||
if(PrJobDialog(prtRec)){
|
||||
if(::PrJobDialog(prtRec)){
|
||||
// have the print record
|
||||
theResult = NS_OK;
|
||||
mPrtRec = prtRec;
|
||||
|
|
Загрузка…
Ссылка в новой задаче