Author Topic: Help runtime fixed  (Read 1672 times)

Offline purlow

  • Acquaintance
  • *
  • Posts: 4
    • View Profile
Help runtime fixed
« on: November 03, 2006, 10:10:47 am »
If you try to access a help topic in the "library objects" or "daemon objects" indices that doesn't exist a runtime error will occur. This is due to GetTopic() returning zero and then trying to call GetHelp() on it. The problem is at line 323 and 383.



code:
topic = GetTopic(index, topic);
if(catch(help = topic->GetHelp(topic)) ) {
    Error = "An error occurred in attempting to access help.";
    return 0;
}




should be:



code:
topic = GetTopic(index, topic);
if( topic == 0 || catch(help = topic->GetHelp(topic)) ) {
    Error = "An error occurred in attempting to access help.";
    return 0;
}




--Purlow