Skip to content

Commit

Permalink
Merge "[fixed] stability issue" into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Popovici authored and gerrit committed Sep 5, 2017
2 parents fbad116 + bad5b2e commit 2d833de
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ void DroidMaintenanceSessionImplementation::sendMaintanceRunBox(){

ManagedReference<DroidMaintenanceModuleDataComponent*> module = this->maintModule.get();

if (module == nullptr)
return;

ManagedReference<SuiListBox*> box = new SuiListBox(creature, SuiWindowType::DROID_MAINTENANCE_RUN_LIST, SuiListBox::HANDLETHREEBUTTON);
box->setCallback(new DroidMaintenanceSessionRunMenuSuiCallback(creature->getZoneServer()));
// we need to add additional text i think
Expand Down Expand Up @@ -113,6 +116,12 @@ void DroidMaintenanceSessionImplementation::sendMaintenanceTransferBox(){
}

ManagedReference<DroidMaintenanceModuleDataComponent*> module = this->maintModule.get();

if (module == nullptr) {
cancelSession();
return;
}

// create transfer box
ManagedReference<SuiTransferBox*> sui = new SuiTransferBox(creature,SuiWindowType::DROID_ADD_STRUCTURE_AMOUNT);
sui->setCallback(new DroidMaintenanceSessionAddCreditsSuiCallback(creature->getZoneServer()));
Expand Down Expand Up @@ -174,6 +183,12 @@ void DroidMaintenanceSessionImplementation::performMaintenanceRun(){
}

Reference<DroidMaintenanceModuleDataComponent*> module = this->maintModule.get();

if (module == nullptr) {
cancelSession();
return;
}

ManagedReference<DroidObject*> droid = module->getDroidObject();

if (droid == nullptr) {
Expand Down

0 comments on commit 2d833de

Please sign in to comment.