A construction machine comprising: a first prime mover; a first hydraulic drive device that has a plurality of first closed-circuit pumps (11, 12) and a plurality of first open-circuit pumps (15, 16) being driven by the first prime mover; a plurality of first hydraulic actuators (1, 3) that operate with pressure oil supplied from at least one of the plurality of first closed-circuit pumps (11, 12) and the plurality of first open-circuit pumps (15, 16); a second prime mover; a second hydraulic drive device that has a plurality of second closed-circuit pumps (13, 14) and a plurality of second open-circuit pumps (17, 18) being driven by the second prime mover; and a plurality of second hydraulic actuators (5, 7) that operate with pressure oil supplied from at least one of the plurality of second closed-circuit pumps (13, 14) and the plurality of second open-circuit pumps (17, 18), characterized in that, the first hydraulic drive device has: a plurality of first closed circuits that each connect one of the plurality of first hydraulic actuators (1, 3) and one of the plurality of first closed-circuit pumps (11, 12); and a plurality of first assist flow paths (40, 41) that each connect one of the plurality of first closed circuits and one of the plurality of first open-circuit pumps (15, 16) and that supply pressure oil from the first open-circuit pump (15, 16) to the first closed circuit, the second hydraulic drive device is provided with a plurality of second closed circuits that each connect one of the plurality of second hydraulic actuators (5, 7) and one of the plurality of second closed-circuit pumps (13, 14), and the construction machine further comprises: at least one first emergency flow path (50, 51) that branches from one of the plurality of first assist flow paths (40, 41) and connects to one of the plurality of second closed circuits and that supplies pressure oil from the first open-circuit pump (15, 16) to the second closed circuit; a first assist switching device (23a, 24a; 26a, 27a; 28a, 29a) for guiding pressure oil flowing through the first assist flow path (40, 41) to the first emergency flow path (50, 51); and a control device that controls operation of the first assist switching device (23a, 24a; 26a, 27a; 28a, 29a). a first prime mover; a first hydraulic drive device that has a plurality of first closed-circuit pumps (11, 12) and a plurality of first open-circuit pumps (15, 16) being driven by the first prime mover; a plurality of first hydraulic actuators (1, 3) that operate with pressure oil supplied from at least one of the plurality of first closed-circuit pumps (11, 12) and the plurality of first open-circuit pumps (15, 16); a second prime mover; a second hydraulic drive device that has a plurality of second closed-circuit pumps (13, 14) and a plurality of second open-circuit pumps (17, 18) being driven by the second prime mover; and a plurality of second hydraulic actuators (5, 7) that operate with pressure oil supplied from at least one of the plurality of second closed-circuit pumps (13, 14) and the plurality of second open-circuit pumps (17, 18), characterized in that, the first hydraulic drive device has: a plurality of first closed circuits that each connect one of the plurality of first hydraulic actuators (1, 3) and one of the plurality of first closed-circuit pumps (11, 12); and a plurality of first assist flow paths (40, 41) that each connect one of the plurality of first closed circuits and one of the plurality of first open-circuit pumps (15, 16) and that supply pressure oil from the first open-circuit pump (15, 16) to the first closed circuit, a plurality of first closed circuits that each connect one of the plurality of first hydraulic actuators (1, 3) and one of the plurality of first closed-circuit pumps (11, 12); and a plurality of first assist flow paths (40, 41) that each connect one of the plurality of first closed circuits and one of the plurality of first open-circuit pumps (15, 16) and that supply pressure oil from the first open-circuit pump (15, 16) to the first closed circuit, the second hydraulic drive device is provided with a plurality of second closed circuits that each connect one of the plurality of second hydraulic actuators (5, 7) and one of the plurality of second closed-circuit pumps (13, 14), and the construction machine further comprises: at least one first emergency flow path (50, 51) that branches from one of the plurality of first assist flow paths (40, 41) and connects to one of the plurality of second closed circuits and that supplies pressure oil from the first open-circuit pump (15, 16) to the second closed circuit; a first assist switching device (23a, 24a; 26a, 27a; 28a, 29a) for guiding pressure oil flowing through the first assist flow path (40, 41) to the first emergency flow path (50, 51); and a control device that controls operation of the first assist switching device (23a, 24a; 26a, 27a; 28a, 29a). at least one first emergency flow path (50, 51) that branches from one of the plurality of first assist flow paths (40, 41) and connects to one of the plurality of second closed circuits and that supplies pressure oil from the first open-circuit pump (15, 16) to the second closed circuit; a first assist switching device (23a, 24a; 26a, 27a; 28a, 29a) for guiding pressure oil flowing through the first assist flow path (40, 41) to the first emergency flow path (50, 51); and a control device that controls operation of the first assist switching device (23a, 24a; 26a, 27a; 28a, 29a).