Fix incorrect null pointer check

master
Richard Stanway 2015-03-04 00:40:17 +01:00
parent 9f9d4ebb33
commit f5cd330678
1 changed files with 4 additions and 4 deletions

View File

@ -58,12 +58,12 @@ bool LoadPlugin()
void UnloadPlugin()
{
if (thePlugin->GetSettings()->hotkeyID)
OBSDeleteHotkey(thePlugin->GetSettings()->hotkeyID);
if(thePlugin)
{
delete thePlugin;
if (thePlugin->GetSettings()->hotkeyID)
OBSDeleteHotkey(thePlugin->GetSettings()->hotkeyID);
delete thePlugin;
thePlugin = NULL;
}
}