MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001994VCMIGUI - Otherpublic2014-12-22 11:242015-01-02 04:52
ReporterSXX 
Assigned ToSXX 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.97 
Target VersionFixed in Version0.97b 
Summary0001994: Dismissal of last troop of a hero is possible and cause crash
DescriptionDismiss button on last troop should be grayed out.

Considering there is task 0000364 it's looks like that worked properly long time ago, but then was broken.
TagsNo tags attached.
Attached Files

- Relationships
related to 0000364closedIvan You can attempt to dismiss the last troop of a hero, but when you click Yes nothing happens. 

-  Notes
(0005250)
SXX (administrator)
2014-12-23 02:23
edited on: 2014-12-23 04:10

So here window troops using CGarrisonSlot and CGarrisonSlot::clickLeft does have check that does work and set canUpgrade to false. As result "dism" callback that passed into CStackWindow is nullptr.

Though funny thing is that check at /client/windows/CCreatureWindow.cpp:531
	if (parent->info->dismissInfo)

"dismissInfo" is properly initizlized object so button appear and of course game will crash once it's try to call nullptr.

Though if check "callback" explicitly for nullptr everything work properly:
	if (parent->info->dismissInfo->callback != nullptr)


(0005261)
SXX (administrator)
2014-12-24 14:22
edited on: 2014-12-24 14:22

Fixed:
https://github.com/vcmi/vcmi/commit/8a697f2ba3fe37ea225050e1f9cf5bc71cb1362b [^]


- Issue History
Date Modified Username Field Change
2014-12-22 11:24 SXX New Issue
2014-12-22 11:24 SXX Relationship added related to 0000364
2014-12-23 02:13 SXX Assigned To => SXX
2014-12-23 02:13 SXX Status new => assigned
2014-12-23 02:23 SXX Note Added: 0005250
2014-12-23 02:23 SXX Note Edited: 0005250 View Revisions
2014-12-23 04:10 SXX Note Edited: 0005250 View Revisions
2014-12-24 14:22 SXX Note Added: 0005261
2014-12-24 14:22 SXX Status assigned => resolved
2014-12-24 14:22 SXX Fixed in Version => 0.97b
2014-12-24 14:22 SXX Resolution open => fixed
2014-12-24 14:22 SXX Note Edited: 0005261 View Revisions
2015-01-02 04:52 SXX Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean