Skip to content

Commit

Permalink
UI: Use qobject_cast when getting OBSBasic
Browse files Browse the repository at this point in the history
Since we are converting between qobjects, it is safer to use
qobject_cast than reinterpret_cast.
  • Loading branch information
cg2121 committed Nov 15, 2024
1 parent 97d5a1c commit 35dbc1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9688,7 +9688,7 @@ void OBSBasic::RepairCustomExtraDockName()

OBSBasic *OBSBasic::Get()
{
return reinterpret_cast<OBSBasic *>(App()->GetMainWindow());
return qobject_cast<OBSBasic *>(App()->GetMainWindow());
}

bool OBSBasic::StreamingActive()
Expand Down

0 comments on commit 35dbc1f

Please sign in to comment.