Gui: Use freecad_cast whenever possible
This commit is contained in:
committed by
Benjamin Nauck
parent
d586447a7d
commit
6e2583cdcd
@@ -46,7 +46,7 @@ void WorkbenchFactoryInst::destruct ()
|
||||
Workbench* WorkbenchFactoryInst::createWorkbench ( const char* sName ) const
|
||||
{
|
||||
auto obj = (Workbench*)Produce( sName );
|
||||
auto wb = dynamic_cast<Workbench*>(obj);
|
||||
auto wb = freecad_cast<Workbench*>(obj);
|
||||
if (!wb) {
|
||||
delete obj; // delete the unknown object as no workbench object
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user