Skip to content

Commit

Permalink
Cortex: fix for possible null-dereference
Browse files Browse the repository at this point in the history
CID 600442
  • Loading branch information
stpere committed Jul 3, 2015
1 parent 8108282 commit be61575
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/apps/cortex/MediaRoutingView/MediaRoutingView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ DiagramWire *MediaRoutingView::createWire(

MediaJack *outputJack, *inputJack;
MediaJack *jack = dynamic_cast<MediaJack *>(fromWhich);
if (jack && jack->isOutput())

if (jack == NULL)
return 0;

if (jack->isOutput())
{
outputJack = jack;
inputJack = dynamic_cast<MediaJack *>(toWhich);
Expand Down

0 comments on commit be61575

Please sign in to comment.