A firearm is provided including a frame having a magazine receptacle, a trigger, and a magazine. A safety device to lock the trigger when the magazine is removed is provided that includes a trigger bow having leaf spring receiver. A leaf spring extends from the frame and has an end that is free to flex perpendicularly to the trigger. The leaf spring flexes based on position of the magazine, from a lock position when the magazine is in the released position to an unlock position when the magazine is in the installed position. The second end of the leaf spring is engaged to the leaf spring receiver to prevent movement of the trigger when the leaf spring is in the lock position and disengaged from the leaf spring receiver to allow movement of the trigger when the leaf spring is in the unlock position.
A handgun and a locking device for a handgun are disclosed, which handgun includes a housing, a magazine-receiving space in the housing, a slide movable in the housing, and a trigger mechanism; the locking device includes a locking body to be inserted in the magazine-receiving space, the locking body at least partially being shaped like a magazine and including a releasable catch engaging in the magazine-receiving space when the locking body is in its inserted state, and cooperating with an eccentric provided in the locking body.