diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 5c5e6525a6f..940cd869da3 100755
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -962,7 +962,9 @@ if ($action == 'create' || $action == 'presend') {
$morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetThirdParty'), 0).' ';
}
$morehtmlref .= $form->form_thirdparty($url_page_current.'?track_id='.$object->track_id, $object->socid, $action == 'editcustomer' ? 'editcustomer' : 'none', '', 1, 0, 0, array(), 1);
- $morehtmlref .= ' - '.img_picto($langs->trans("Tickets"), 'ticket', 'class="pictofixedwidth"').' '.$langs->trans("TicketHistory").'';
+ if (!empty($object->socid)) {
+ $morehtmlref .= ' - '.img_picto($langs->trans("Tickets"), 'ticket', 'class="pictofixedwidth"').' '.$langs->trans("TicketHistory").'';
+ }
}
// Project