]> git.saurik.com Git - wxWidgets.git/commitdiff
don't crash on error
authorPaul Cornett <paulcor@bullseye.com>
Tue, 29 Mar 2011 05:29:42 +0000 (05:29 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Tue, 29 Mar 2011 05:29:42 +0000 (05:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/print.cpp

index 2772055c877164b8bdc0414df062bc31406fcd02..39c517b0fd4a10ac3fc70eab6bef551a87f0532c 100644 (file)
@@ -667,8 +667,8 @@ int wxGtkPrintDialog::ShowModal()
     }
     else if (response == GTK_PRINT_OPERATION_RESULT_ERROR)
     {
+        wxLogError(_("Error while printing: ") + wxString(gError ? gError->message : "???"));
         g_error_free (gError);
-        wxLogError(_("Error while printing: ") + wxString::Format(_("%s"), gError->message));
         return wxID_NO; // We use wxID_NO because there is no wxID_ERROR available
     }